catch rare state loss exception when hitting home button to pop back stack

This commit is contained in:
Daniel Gultsch 2018-06-25 10:31:22 +02:00
parent ad5c9f85c3
commit 9a4109eaa1

View file

@ -468,7 +468,11 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
case android.R.id.home:
FragmentManager fm = getFragmentManager();
if (fm.getBackStackEntryCount() > 0) {
fm.popBackStack();
try {
fm.popBackStack();
} catch (IllegalArgumentException e) {
Log.w(Config.LOGTAG,"Unable to pop back stack after pressing home button");
}
return true;
}
break;