forked from organicmaps/organicmaps
Merge pull request #1449 from trashkalmar/mm-2275-crash-on-theme-auto-switch
[android] fix: Crash when trying to start routing on tablets.
This commit is contained in:
commit
a76a615b7c
1 changed files with 9 additions and 5 deletions
|
@ -925,13 +925,17 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
|
||||
private void removeFragmentImmediate(Fragment fragment)
|
||||
{
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.remove(fragment)
|
||||
.commitAllowingStateLoss();
|
||||
getSupportFragmentManager().executePendingTransactions();
|
||||
FragmentManager fm = getSupportFragmentManager();
|
||||
if (fm.isDestroyed())
|
||||
return;
|
||||
|
||||
fm.beginTransaction()
|
||||
.remove(fragment)
|
||||
.commitAllowingStateLoss();
|
||||
fm.executePendingTransactions();
|
||||
}
|
||||
|
||||
boolean removeCurrentFragment(boolean animate)
|
||||
private boolean removeCurrentFragment(boolean animate)
|
||||
{
|
||||
for (String tag : DOCKED_FRAGMENTS)
|
||||
if (removeFragment(tag, animate))
|
||||
|
|
Loading…
Add table
Reference in a new issue