activities: handle IllegalStateException when calling super.onBackPressed
This commit is contained in:
parent
3f85a1328c
commit
7c5b8899c1
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user