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

@@ -96,7 +96,7 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
if (preference != null) {
mPreference = preference;
}
if (this instanceof Preference.OnPreferenceChangeListener) {
if (mPreference != null && this instanceof Preference.OnPreferenceChangeListener) {
mPreference.setOnPreferenceChangeListener(
(Preference.OnPreferenceChangeListener) this);
}