diff options
author | Александр Зацепин <az@mapswithme.com> | 2019-12-23 17:25:09 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2019-12-23 18:22:37 +0300 |
commit | 38e532067881a3c00a618dfc203cdac0989c9031 (patch) | |
tree | 4f8d5a76d67bcb3a3490c6d76dd118794f4ee2cd /android/src/com/mapswithme/maps/Framework.java | |
parent | 766818f2a464629501ce7b7a6800b56efa382743 (diff) |
[android] Fixed crash during access to C++ framework place page object while it's not intitialized. It may happen when the app was killed/dumped by OS when PP is opened (launched by incoming intent or deeplin) and then core doesn't have place page info and synchronization between platform and C++ framework is broken. So, we don't restore place page info from java map object and it's by design for a while.android-951
Diffstat (limited to 'android/src/com/mapswithme/maps/Framework.java')
-rw-r--r-- | android/src/com/mapswithme/maps/Framework.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/android/src/com/mapswithme/maps/Framework.java b/android/src/com/mapswithme/maps/Framework.java index bb3766b848..1e8da8a563 100644 --- a/android/src/com/mapswithme/maps/Framework.java +++ b/android/src/com/mapswithme/maps/Framework.java @@ -2,14 +2,14 @@ package com.mapswithme.maps; import android.graphics.Bitmap; import android.location.Location; +import android.text.TextUtils; + import androidx.annotation.IntDef; import androidx.annotation.MainThread; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.Size; import androidx.annotation.UiThread; -import android.text.TextUtils; - import com.mapswithme.maps.ads.Banner; import com.mapswithme.maps.ads.LocalAdInfo; import com.mapswithme.maps.api.ParsedRoutingData; @@ -528,6 +528,15 @@ public class Framework public static native void nativeSetSearchViewport(double lat, double lon, int zoom); + /** + * In case of the app was dumped by system to the hard drive, Java map object can be + * restored from parcelable, but c++ framework is created from scratch and internal + * place page object is not initialized. So, do not restore place page in this case. + * + * @return true if c++ framework has initialized internal place page object, otherwise - false. + */ + public static native boolean nativeHasPlacePageInfo(); + public enum LocalAdsEventType { LOCAL_ADS_EVENT_SHOW_POINT, |