activities: handle IllegalStateException when calling super.onBackPressed

This commit is contained in:
Andrew Dolgov 2016-02-03 20:46:27 +03:00
parent 3f85a1328c
commit 7c5b8899c1
4 changed files with 24 additions and 4 deletions

View File

@ -304,7 +304,12 @@ public class DetailActivity extends OnlineActivity implements HeadlinesEventList
setResult(Activity.RESULT_OK, resultIntent);
super.onBackPressed();
try {
super.onBackPressed();
} catch (IllegalStateException e) {
// java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
e.printStackTrace();
}
}
@Override

View File

@ -387,7 +387,12 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList
m_drawerLayout.openDrawer(Gravity.START);
} else {
super.onBackPressed();
try {
super.onBackPressed();
} catch (IllegalStateException e) {
// java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
e.printStackTrace();
}
}
}

View File

@ -201,7 +201,12 @@ public class OfflineDetailActivity extends OfflineActivity implements OfflineHea
@Override
public void onBackPressed() {
super.onBackPressed();
try {
super.onBackPressed();
} catch (IllegalStateException e) {
// java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
e.printStackTrace();
}
}
@Override

View File

@ -275,7 +275,12 @@ public class OfflineMasterActivity extends OfflineActivity implements OfflineHea
m_drawerLayout.openDrawer(Gravity.START);
} else {
super.onBackPressed();
try {
super.onBackPressed();
} catch (IllegalStateException e) {
// java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
e.printStackTrace();
}
}
}