From ab1cb3ccf86ab265e777cf554960dc1c52d11a3c Mon Sep 17 00:00:00 2001 From: Alexey Osminin Date: Mon, 2 Nov 2020 11:59:25 +0300 Subject: [PATCH] [android] reset layer mode when tutorial is shown --- android/src/com/mapswithme/maps/MwmActivity.java | 2 ++ android/src/com/mapswithme/maps/tips/Tutorial.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index c00a084632..35d01d2008 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -2550,6 +2550,8 @@ public class MwmActivity extends BaseMwmFragmentActivity public void setTutorial(@NonNull Tutorial tutorial) { mTutorial = tutorial; + if (mTutorial.isLayer()) + mToggleMapLayerController.turnOff(); mToggleMapLayerController.setTutorial(tutorial); } diff --git a/android/src/com/mapswithme/maps/tips/Tutorial.java b/android/src/com/mapswithme/maps/tips/Tutorial.java index 27cee8f4c2..b2578024ed 100644 --- a/android/src/com/mapswithme/maps/tips/Tutorial.java +++ b/android/src/com/mapswithme/maps/tips/Tutorial.java @@ -183,4 +183,9 @@ public enum Tutorial LOGGER.d(TAG, "tipsApi = " + tipsApi); return tipsApi; } + + public boolean isLayer() + { + return this == SUBWAY || this == ISOLINES; + } }