From 67a4ff4f8d66cdae59b58ed8730deff56c3fab11 Mon Sep 17 00:00:00 2001 From: Dmitry Donskoy Date: Mon, 17 Sep 2018 13:18:44 +0300 Subject: [PATCH] [android] Rename class + fix rebase --- android/multidex-config.txt | 1 - android/src/com/mapswithme/maps/MwmActivity.java | 3 --- ...kground.java => ImmersiveModeCompatPromptBackground.java} | 4 ++-- android/src/com/mapswithme/maps/tips/TipsApi.java | 5 +++-- 4 files changed, 5 insertions(+), 8 deletions(-) rename android/src/com/mapswithme/maps/tips/{ImmersiveCompatPromptBackground.java => ImmersiveModeCompatPromptBackground.java} (94%) diff --git a/android/multidex-config.txt b/android/multidex-config.txt index 324dac57e8..85151595c5 100644 --- a/android/multidex-config.txt +++ b/android/multidex-config.txt @@ -4,7 +4,6 @@ com/mapswithme/maps/bookmarks/data/FeatureId.class com/mapswithme/maps/bookmarks/data/MapObject.class com/mapswithme/maps/location/PlatformSocket.class com/mapswithme/maps/search/PopularityProvider.class -com/mapswithme/maps/metrics/UserActionsCollector.class com/mapswithme/maps/ugc/UGC$Rating.class com/mapswithme/util/log/LoggerFactory.class com/mapswithme/util/HttpClient.class diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index f355488d1e..96dcb88974 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -72,7 +72,6 @@ import com.mapswithme.maps.maplayer.subway.SubwayManager; import com.mapswithme.maps.maplayer.traffic.OnTrafficLayerToggleListener; import com.mapswithme.maps.maplayer.traffic.TrafficManager; import com.mapswithme.maps.maplayer.traffic.widget.TrafficButton; -import com.mapswithme.maps.metrics.UserActionsLogger; import com.mapswithme.maps.purchase.AdsRemovalPurchaseCallback; import com.mapswithme.maps.purchase.AdsRemovalPurchaseControllerProvider; import com.mapswithme.maps.purchase.PurchaseController; @@ -125,7 +124,6 @@ import com.mapswithme.util.sharing.SharingHelper; import com.mapswithme.util.statistics.AlohaHelper; import com.mapswithme.util.statistics.PlacePageTracker; import com.mapswithme.util.statistics.Statistics; -import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt; import java.io.Serializable; import java.util.Locale; @@ -241,7 +239,6 @@ public class MwmActivity extends BaseMwmFragmentActivity PurchaseFactory.createPurchaseController(); @NonNull private final OnClickListener mOnMyPositionClickListener = new CurrentPositionClickListener(); - private MaterialTapTargetPrompt mTutorial; public interface LeftAnimationTrackListener { diff --git a/android/src/com/mapswithme/maps/tips/ImmersiveCompatPromptBackground.java b/android/src/com/mapswithme/maps/tips/ImmersiveModeCompatPromptBackground.java similarity index 94% rename from android/src/com/mapswithme/maps/tips/ImmersiveCompatPromptBackground.java rename to android/src/com/mapswithme/maps/tips/ImmersiveModeCompatPromptBackground.java index 90c9d3ff0b..4888c95c2e 100644 --- a/android/src/com/mapswithme/maps/tips/ImmersiveCompatPromptBackground.java +++ b/android/src/com/mapswithme/maps/tips/ImmersiveModeCompatPromptBackground.java @@ -18,7 +18,7 @@ import uk.co.samuelwall.materialtaptargetprompt.extras.PromptBackground; import uk.co.samuelwall.materialtaptargetprompt.extras.PromptOptions; import uk.co.samuelwall.materialtaptargetprompt.extras.PromptUtils; -public class ImmersiveCompatPromptBackground extends PromptBackground +public class ImmersiveModeCompatPromptBackground extends PromptBackground { @NonNull private final WindowManager mWindowManager; @@ -34,7 +34,7 @@ public class ImmersiveCompatPromptBackground extends PromptBackground @NonNull private final DisplayMetrics mBaseMetrics; - ImmersiveCompatPromptBackground(@NonNull WindowManager windowManager) + ImmersiveModeCompatPromptBackground(@NonNull WindowManager windowManager) { mWindowManager = windowManager; mPaint = new Paint(); diff --git a/android/src/com/mapswithme/maps/tips/TipsApi.java b/android/src/com/mapswithme/maps/tips/TipsApi.java index 969644de46..87347f7bfc 100644 --- a/android/src/com/mapswithme/maps/tips/TipsApi.java +++ b/android/src/com/mapswithme/maps/tips/TipsApi.java @@ -8,6 +8,7 @@ import android.support.annotation.Nullable; import android.support.annotation.StringRes; import android.view.View; +import com.mapswithme.maps.Framework; import com.mapswithme.maps.MwmActivity; import com.mapswithme.maps.R; import com.mapswithme.maps.metrics.UserActionsLogger; @@ -138,7 +139,7 @@ public enum TipsApi .setSecondaryTextTypeface(Typeface.DEFAULT) .setBackgroundColour(ThemeUtils.getColor(activity, R.attr.tipsBgColor)) .setFocalColour(activity.getResources().getColor(android.R.color.transparent)) - .setPromptBackground(new ImmersiveCompatPromptBackground(activity.getWindowManager())) + .setPromptBackground(new ImmersiveModeCompatPromptBackground(activity.getWindowManager())) .setPromptStateChangeListener((prompt, state) -> onPromptStateChanged(state)); builder.show(); } @@ -161,7 +162,7 @@ public enum TipsApi @NonNull public static TipsApi requestCurrent(@NonNull Class requiredScreenClass) { - int index = 1; + int index = Framework.nativeGetCurrentTipsApi(); TipsApi value = index >= 0 ? values()[index] : STUB; TipsApi tipsApi = value != STUB && value.isScreenAllowed(requiredScreenClass) ? value : STUB;