Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'android/src/com/mapswithme/maps/widget/placepage')
-rw-r--r--android/src/com/mapswithme/maps/widget/placepage/BottomSheetPlacePageController.java16
-rw-r--r--android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java6
2 files changed, 16 insertions, 6 deletions
diff --git a/android/src/com/mapswithme/maps/widget/placepage/BottomSheetPlacePageController.java b/android/src/com/mapswithme/maps/widget/placepage/BottomSheetPlacePageController.java
index 1c74686a36..bea214ef02 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/BottomSheetPlacePageController.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/BottomSheetPlacePageController.java
@@ -9,11 +9,6 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.os.Bundle;
-import androidx.annotation.DrawableRes;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.core.view.GestureDetectorCompat;
-import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
@@ -21,6 +16,11 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
+import androidx.annotation.DrawableRes;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.appcompat.widget.Toolbar;
+import androidx.core.view.GestureDetectorCompat;
import com.mapswithme.maps.Framework;
import com.mapswithme.maps.R;
import com.mapswithme.maps.ads.CompoundNativeAdLoader;
@@ -525,6 +525,12 @@ public class BottomSheetPlacePageController implements PlacePageController, Loca
if (mPlacePageBehavior.getState() == AnchorBottomSheetBehavior.STATE_HIDDEN)
return;
+ if (!Framework.nativeHasPlacePageInfo())
+ {
+ close();
+ return;
+ }
+
MapObject object = inState.getParcelable(EXTRA_MAP_OBJECT);
if (object == null)
return;
diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
index abd4e2b91e..0e6db36928 100644
--- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
+++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java
@@ -2079,7 +2079,11 @@ public class PlacePageView extends NestedScrollView
@Override
public void onBookmarkSaved(long bookmarkId, boolean movedFromCategory)
{
- setMapObject(BookmarkManager.INSTANCE.updateBookmarkPlacePage(bookmarkId), null);
+ Bookmark updatedBookmark = BookmarkManager.INSTANCE.updateBookmarkPlacePage(bookmarkId);
+ if (updatedBookmark == null)
+ return;
+
+ setMapObject(updatedBookmark, null);
NetworkPolicy policy = NetworkPolicy.newInstance(NetworkPolicy.getCurrentNetworkUsageStatus());
refreshViews(policy);
}