forked from organicmaps/organicmaps
Bugfix for fragment, that couldn't be popped after activity called onSaveInstanceState.
This commit is contained in:
parent
df8efe4ed1
commit
2c896a801e
1 changed files with 4 additions and 2 deletions
|
@ -1188,13 +1188,15 @@ public class MWMActivity extends BaseMwmFragmentActivity
|
|||
return false;
|
||||
|
||||
Fragment fragment = manager.findFragmentByTag(SearchFragment.class.getName());
|
||||
if (fragment != null)
|
||||
// TODO we cant pop fragment, if it isn't resumed, cause of 'at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1375)'
|
||||
// consider other possibilities here
|
||||
if (fragment != null && fragment.isResumed())
|
||||
{
|
||||
manager.popBackStack();
|
||||
return true;
|
||||
}
|
||||
fragment = manager.findFragmentByTag(DownloadFragment.class.getName());
|
||||
if (fragment != null)
|
||||
if (fragment != null && fragment.isResumed())
|
||||
{
|
||||
manager.popBackStack();
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue