Loading src/com/android/settings/homepage/contextualcards/slices/NotificationChannelSlice.java +1 −1 Original line number Diff line number Diff line Loading @@ -459,7 +459,7 @@ public class NotificationChannelSlice implements CustomSliceable { private boolean isChannelConfigurable(NotificationChannel channel, NotificationBackend.AppRow appRow) { if (channel != null && appRow != null) { return !TextUtils.equals(channel.getId(), appRow.lockedChannelId); return !channel.isImportanceLockedByOEM(); } return false; Loading src/com/android/settings/homepage/contextualcards/slices/NotificationMultiChannelAppRow.java +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.settings.homepage.contextualcards.slices; import android.app.role.RoleManager; import android.content.Context; import android.content.pm.PackageInfo; Loading Loading @@ -46,7 +47,7 @@ class NotificationMultiChannelAppRow implements Callable<NotificationBackend.App mPackageInfo.applicationInfo.packageName, mPackageInfo.applicationInfo.uid); if (channelCount > 1) { return mNotificationBackend.loadAppRow(mContext, mContext.getPackageManager(), mPackageInfo); mContext.getSystemService(RoleManager.class), mPackageInfo); } return null; } Loading src/com/android/settings/notification/BlockPreferenceController.java +14 −7 Original line number Diff line number Diff line Loading @@ -54,13 +54,7 @@ public class BlockPreferenceController extends NotificationPreferenceController if (mAppRow == null) { return false; } if (mChannel != null) { return isChannelBlockable(); } else if (mChannelGroup != null) { return isChannelGroupBlockable(); } else { return !mAppRow.systemApp || (mAppRow.systemApp && mAppRow.banned); } return true; } public void updateState(Preference preference) { Loading @@ -78,6 +72,19 @@ public class BlockPreferenceController extends NotificationPreferenceController } bar.setDisabledByAdmin(mAdmin); if (mChannel != null && !isChannelBlockable()) { bar.setEnabled(false); } if (mChannelGroup != null && !isChannelGroupBlockable()) { bar.setEnabled(false); } if (mChannel == null && mAppRow.systemApp && (!mAppRow.banned || mAppRow.lockedImportance)) { bar.setEnabled(false); } if (mChannel != null) { bar.setChecked(!mAppRow.banned && mChannel.getImportance() != NotificationManager.IMPORTANCE_NONE); Loading src/com/android/settings/notification/HighImportancePreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class HighImportancePreferenceController extends NotificationPreferenceCo @Override public void updateState(Preference preference) { if (mAppRow != null && mChannel != null) { preference.setEnabled(mAdmin == null && isChannelBlockable()); preference.setEnabled(mAdmin == null && !mChannel.isImportanceLockedByOEM()); RestrictedSwitchPreference pref = (RestrictedSwitchPreference) preference; pref.setChecked(mChannel.getImportance() >= IMPORTANCE_HIGH); Loading src/com/android/settings/notification/ImportancePreferenceController.java +2 −2 Original line number Diff line number Diff line Loading @@ -59,9 +59,9 @@ public class ImportancePreferenceController extends NotificationPreferenceContro @Override public void updateState(Preference preference) { if (mAppRow!= null && mChannel != null) { preference.setEnabled(mAdmin == null && isChannelBlockable()); preference.setEnabled(mAdmin == null && !mChannel.isImportanceLockedByOEM()); ImportancePreference pref = (ImportancePreference) preference; pref.setConfigurable(isChannelBlockable()); pref.setConfigurable(!mChannel.isImportanceLockedByOEM()); pref.setImportance(mChannel.getImportance()); pref.setDisplayInStatusBar(mBackend.showSilentInStatusBar(mContext.getPackageName())); // TODO: b/128445911 pass along lock screen setting Loading Loading
src/com/android/settings/homepage/contextualcards/slices/NotificationChannelSlice.java +1 −1 Original line number Diff line number Diff line Loading @@ -459,7 +459,7 @@ public class NotificationChannelSlice implements CustomSliceable { private boolean isChannelConfigurable(NotificationChannel channel, NotificationBackend.AppRow appRow) { if (channel != null && appRow != null) { return !TextUtils.equals(channel.getId(), appRow.lockedChannelId); return !channel.isImportanceLockedByOEM(); } return false; Loading
src/com/android/settings/homepage/contextualcards/slices/NotificationMultiChannelAppRow.java +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.settings.homepage.contextualcards.slices; import android.app.role.RoleManager; import android.content.Context; import android.content.pm.PackageInfo; Loading Loading @@ -46,7 +47,7 @@ class NotificationMultiChannelAppRow implements Callable<NotificationBackend.App mPackageInfo.applicationInfo.packageName, mPackageInfo.applicationInfo.uid); if (channelCount > 1) { return mNotificationBackend.loadAppRow(mContext, mContext.getPackageManager(), mPackageInfo); mContext.getSystemService(RoleManager.class), mPackageInfo); } return null; } Loading
src/com/android/settings/notification/BlockPreferenceController.java +14 −7 Original line number Diff line number Diff line Loading @@ -54,13 +54,7 @@ public class BlockPreferenceController extends NotificationPreferenceController if (mAppRow == null) { return false; } if (mChannel != null) { return isChannelBlockable(); } else if (mChannelGroup != null) { return isChannelGroupBlockable(); } else { return !mAppRow.systemApp || (mAppRow.systemApp && mAppRow.banned); } return true; } public void updateState(Preference preference) { Loading @@ -78,6 +72,19 @@ public class BlockPreferenceController extends NotificationPreferenceController } bar.setDisabledByAdmin(mAdmin); if (mChannel != null && !isChannelBlockable()) { bar.setEnabled(false); } if (mChannelGroup != null && !isChannelGroupBlockable()) { bar.setEnabled(false); } if (mChannel == null && mAppRow.systemApp && (!mAppRow.banned || mAppRow.lockedImportance)) { bar.setEnabled(false); } if (mChannel != null) { bar.setChecked(!mAppRow.banned && mChannel.getImportance() != NotificationManager.IMPORTANCE_NONE); Loading
src/com/android/settings/notification/HighImportancePreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class HighImportancePreferenceController extends NotificationPreferenceCo @Override public void updateState(Preference preference) { if (mAppRow != null && mChannel != null) { preference.setEnabled(mAdmin == null && isChannelBlockable()); preference.setEnabled(mAdmin == null && !mChannel.isImportanceLockedByOEM()); RestrictedSwitchPreference pref = (RestrictedSwitchPreference) preference; pref.setChecked(mChannel.getImportance() >= IMPORTANCE_HIGH); Loading
src/com/android/settings/notification/ImportancePreferenceController.java +2 −2 Original line number Diff line number Diff line Loading @@ -59,9 +59,9 @@ public class ImportancePreferenceController extends NotificationPreferenceContro @Override public void updateState(Preference preference) { if (mAppRow!= null && mChannel != null) { preference.setEnabled(mAdmin == null && isChannelBlockable()); preference.setEnabled(mAdmin == null && !mChannel.isImportanceLockedByOEM()); ImportancePreference pref = (ImportancePreference) preference; pref.setConfigurable(isChannelBlockable()); pref.setConfigurable(!mChannel.isImportanceLockedByOEM()); pref.setImportance(mChannel.getImportance()); pref.setDisplayInStatusBar(mBackend.showSilentInStatusBar(mContext.getPackageName())); // TODO: b/128445911 pass along lock screen setting Loading