[android] Added handling extra intent in bookmark catalog activity to avoid crash after recovering

This commit is contained in:
Alexander Zatsepin 2018-07-19 19:06:52 +03:00 committed by Vlad Mihaylenko
parent ce45f36ad6
commit 8a55eacd35

View file

@ -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<? extends Fragment> getFragmentClass()
{