Change commit to commitAllowingStateLoss on fragment change

This commit is contained in:
Erwan Croze 2016-11-14 14:42:13 +01:00
parent d305a6bd49
commit aa7f3abae9

View file

@ -455,7 +455,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
} }
transaction.replace(R.id.fragmentContainer, newFragment, newFragmentType.toString()); transaction.replace(R.id.fragmentContainer, newFragment, newFragmentType.toString());
transaction.commit(); transaction.commitAllowingStateLoss();
fm.executePendingTransactions(); fm.executePendingTransactions();
currentFragment = newFragmentType; currentFragment = newFragmentType;
@ -478,7 +478,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
ll.setVisibility(View.VISIBLE); ll.setVisibility(View.VISIBLE);
emptyFragment = true; emptyFragment = true;
transaction.replace(R.id.fragmentContainer2, newFragment); transaction.replace(R.id.fragmentContainer2, newFragment);
transaction.commit(); transaction.commitAllowingStateLoss();
getFragmentManager().executePendingTransactions(); getFragmentManager().executePendingTransactions();
} else { } else {
if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) { if (newFragmentType.shouldAddItselfToTheRightOf(currentFragment)) {
@ -514,7 +514,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
}*/ }*/
transaction.replace(R.id.fragmentContainer, newFragment); transaction.replace(R.id.fragmentContainer, newFragment);
} }
transaction.commit(); transaction.commitAllowingStateLoss();
getFragmentManager().executePendingTransactions(); getFragmentManager().executePendingTransactions();
currentFragment = newFragmentType; currentFragment = newFragmentType;