Fix crash on rotation

Load app/channel data early so that any open dialogs can be properly
reconstructed. Never call done on an entityheadercontroller with
an activity that's not yet started.

Test: robotests
Change-Id: Ib2b9f8f1985ef038959062204aaceff686f4ebcf
Fixes: 74114917
This commit is contained in:
Julia Reynolds
2018-04-19 10:04:53 -04:00
parent 7f50a0c837
commit e2897aedf5
7 changed files with 101 additions and 40 deletions

View File

@@ -68,10 +68,7 @@ public class AppNotificationSettings extends NotificationSettingsBase {
mDynamicPreferences.clear();
}
if (mShowLegacyChannelConfig) {
addPreferencesFromResource(R.xml.channel_notification_settings);
} else {
addPreferencesFromResource(R.xml.app_notification_settings);
if (!mShowLegacyChannelConfig) {
// Load channel settings
new AsyncTask<Void, Void, Void>() {
@Override
@@ -106,7 +103,7 @@ public class AppNotificationSettings extends NotificationSettingsBase {
@Override
protected int getPreferenceScreenResId() {
return R.xml.notification_settings;
return R.xml.app_notification_settings;
}
@Override