Fix notifications crash

Change-Id: I75a34beb124de92c0d7d9033e3fe21dbdeb67ed3
Fixes: 112656503
Test: manual
This commit is contained in:
Julia Reynolds
2018-08-21 10:39:07 -04:00
parent dcfb96ac06
commit 241a192a10

View File

@@ -67,12 +67,18 @@ public class AppNotificationSettings extends NotificationSettingsBase {
// if showing legacy settings, pull advanced settings out of the advanced category
Preference badge = findPreference(KEY_BADGE);
Preference appLink = findPreference(KEY_APP_LINK);
PreferenceGroup advanced = (PreferenceGroup) findPreference(KEY_ADVANCED_CATEGORY);
removePreference(KEY_ADVANCED_CATEGORY);
if (badge != null) {
if (advanced != null) {
advanced.removePreference(badge);
}
screen.addPreference(badge);
}
if (appLink != null) {
if (advanced != null) {
advanced.removePreference(appLink);
}
screen.addPreference(appLink);
}
}