From 8a55eacd35978e60abe01da83c9f81c31e0131fa Mon Sep 17 00:00:00 2001 From: Alexander Zatsepin Date: Thu, 19 Jul 2018 19:06:52 +0300 Subject: [PATCH] [android] Added handling extra intent in bookmark catalog activity to avoid crash after recovering --- .../maps/bookmarks/BookmarksCatalogActivity.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/android/src/com/mapswithme/maps/bookmarks/BookmarksCatalogActivity.java b/android/src/com/mapswithme/maps/bookmarks/BookmarksCatalogActivity.java index 4613d9ca41..d9d62026b9 100644 --- a/android/src/com/mapswithme/maps/bookmarks/BookmarksCatalogActivity.java +++ b/android/src/com/mapswithme/maps/bookmarks/BookmarksCatalogActivity.java @@ -1,14 +1,30 @@ package com.mapswithme.maps.bookmarks; +import android.content.Intent; +import android.os.Bundle; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.v4.app.Fragment; +import com.mapswithme.maps.SplashActivity; import com.mapswithme.maps.base.BaseToolbarActivity; import com.mapswithme.maps.base.OnBackPressListener; import com.mapswithme.util.Utils; public class BookmarksCatalogActivity extends BaseToolbarActivity { + @Override + protected void safeOnCreate(@Nullable Bundle savedInstanceState) + { + // TODO: Move this logic to BaseMwmFragmentActivity after release 8.3.x + // to avoid code duplication for other activities that will be in the same user case. + // https://jira.mail.ru/browse/MAPSME-8195 + Intent intent = getIntent().getParcelableExtra(SplashActivity.EXTRA_INTENT); + if (intent != null) + setIntent(intent); + super.safeOnCreate(savedInstanceState); + } + @Override protected Class getFragmentClass() {