Sometimes there's no advanced settings
Test: manual Change-Id: Iea69ee04f36be51d073bbbd2c0d643c986eb8e89 Fixes: 65964886
This commit is contained in:
@@ -374,7 +374,9 @@ public class ChannelNotificationSettings extends NotificationSettingsBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateDependents(boolean banned) {
|
void updateDependents(boolean banned) {
|
||||||
|
PreferenceGroup parent;
|
||||||
if (mShowLegacyChannelConfig) {
|
if (mShowLegacyChannelConfig) {
|
||||||
|
parent = getPreferenceScreen();
|
||||||
setVisible(mImportanceToggle, checkCanBeVisible(NotificationManager.IMPORTANCE_MIN));
|
setVisible(mImportanceToggle, checkCanBeVisible(NotificationManager.IMPORTANCE_MIN));
|
||||||
} else {
|
} else {
|
||||||
setVisible(mAdvanced, checkCanBeVisible(NotificationManager.IMPORTANCE_MIN));
|
setVisible(mAdvanced, checkCanBeVisible(NotificationManager.IMPORTANCE_MIN));
|
||||||
@@ -383,12 +385,13 @@ public class ChannelNotificationSettings extends NotificationSettingsBase {
|
|||||||
NotificationManager.IMPORTANCE_DEFAULT) && canPulseLight());
|
NotificationManager.IMPORTANCE_DEFAULT) && canPulseLight());
|
||||||
setVisible(mVibrate, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT));
|
setVisible(mVibrate, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT));
|
||||||
setVisible(mRingtone, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT));
|
setVisible(mRingtone, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT));
|
||||||
|
parent = mAdvanced;
|
||||||
}
|
}
|
||||||
setVisible(mAdvanced, mBadge, checkCanBeVisible(NotificationManager.IMPORTANCE_MIN));
|
setVisible(parent, mBadge, checkCanBeVisible(NotificationManager.IMPORTANCE_MIN));
|
||||||
setVisible(mAdvanced, mPriority, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT)
|
setVisible(parent, mPriority, checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT)
|
||||||
|| (checkCanBeVisible(NotificationManager.IMPORTANCE_LOW)
|
|| (checkCanBeVisible(NotificationManager.IMPORTANCE_LOW)
|
||||||
&& mDndVisualEffectsSuppressed));
|
&& mDndVisualEffectsSuppressed));
|
||||||
setVisible(mAdvanced, mVisibilityOverride, isLockScreenSecure()
|
setVisible(parent, mVisibilityOverride, isLockScreenSecure()
|
||||||
&&checkCanBeVisible(NotificationManager.IMPORTANCE_LOW));
|
&&checkCanBeVisible(NotificationManager.IMPORTANCE_LOW));
|
||||||
setVisible(mBlockedDesc, mChannel.getImportance() == IMPORTANCE_NONE);
|
setVisible(mBlockedDesc, mChannel.getImportance() == IMPORTANCE_NONE);
|
||||||
if (mAppLink != null) {
|
if (mAppLink != null) {
|
||||||
|
Reference in New Issue
Block a user