Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package com.android.systemui.statusbar; import android.content.pm.UserInfo; import android.os.SystemProperties; import android.service.notification.StatusBarNotification; import android.util.SparseArray; Loading @@ -25,6 +26,8 @@ public interface NotificationLockscreenUserManager { String NOTIFICATION_UNLOCKED_BY_WORK_CHALLENGE_ACTION = "com.android.systemui.statusbar.work_challenge_unlocked_notification_action"; boolean AUTO_DEMOTE_NOTIFICATIONS = SystemProperties.getBoolean("debug.demote_notifs", false); boolean shouldAllowLockscreenRemoteInput(); /** Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +10 −3 Original line number Diff line number Diff line Loading @@ -292,9 +292,16 @@ public class NotificationLockscreenUserManagerImpl implements Log.wtf(TAG, "mEntryManager was null!", new Throwable()); return false; } return mShowLockscreenNotifications && getEntryManager().getNotificationData().getImportance(sbn.getKey()) boolean exceedsPriorityThreshold; if (AUTO_DEMOTE_NOTIFICATIONS) { exceedsPriorityThreshold = getEntryManager().getNotificationData().getImportance(sbn.getKey()) >= IMPORTANCE_DEFAULT; } else { exceedsPriorityThreshold = !getEntryManager().getNotificationData().isAmbient(sbn.getKey()); } return mShowLockscreenNotifications && exceedsPriorityThreshold; } private void setShowLockscreenNotifications(boolean show) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java +5 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.internal.util.ContrastColorUtil; import com.android.internal.widget.ViewClippingUtil; import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.StatusBarIconView; import com.android.systemui.statusbar.notification.NotificationData; Loading Loading @@ -48,7 +49,8 @@ public class NotificationIconAreaController implements DarkReceiver { @Override public void onTuningChanged(String key, String newValue) { if (key.equals(LOW_PRIORITY)) { mShowLowPriority = "1".equals(newValue); mShowLowPriority = "1".equals(newValue) || !NotificationLockscreenUserManager.AUTO_DEMOTE_NOTIFICATIONS; if (mNotificationScrollLayout != null) { updateStatusBarIcons(); } Loading Loading @@ -234,7 +236,8 @@ public class NotificationIconAreaController implements DarkReceiver { public void updateStatusBarIcons() { updateIconsForLayout(entry -> entry.icon, mNotificationIcons, false /* showAmbient */, false /* showLowPriority */, true /* hideDismissed */, false /* showAmbient */, mShowLowPriority /* showLowPriority */, true /* hideDismissed */, true /* hideRepliedMessages */); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java +3 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ package com.android.systemui.statusbar; import android.content.pm.UserInfo; import android.os.SystemProperties; import android.service.notification.StatusBarNotification; import android.util.SparseArray; Loading @@ -25,6 +26,8 @@ public interface NotificationLockscreenUserManager { String NOTIFICATION_UNLOCKED_BY_WORK_CHALLENGE_ACTION = "com.android.systemui.statusbar.work_challenge_unlocked_notification_action"; boolean AUTO_DEMOTE_NOTIFICATIONS = SystemProperties.getBoolean("debug.demote_notifs", false); boolean shouldAllowLockscreenRemoteInput(); /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +10 −3 Original line number Diff line number Diff line Loading @@ -292,9 +292,16 @@ public class NotificationLockscreenUserManagerImpl implements Log.wtf(TAG, "mEntryManager was null!", new Throwable()); return false; } return mShowLockscreenNotifications && getEntryManager().getNotificationData().getImportance(sbn.getKey()) boolean exceedsPriorityThreshold; if (AUTO_DEMOTE_NOTIFICATIONS) { exceedsPriorityThreshold = getEntryManager().getNotificationData().getImportance(sbn.getKey()) >= IMPORTANCE_DEFAULT; } else { exceedsPriorityThreshold = !getEntryManager().getNotificationData().isAmbient(sbn.getKey()); } return mShowLockscreenNotifications && exceedsPriorityThreshold; } private void setShowLockscreenNotifications(boolean show) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java +5 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.internal.util.ContrastColorUtil; import com.android.internal.widget.ViewClippingUtil; import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.StatusBarIconView; import com.android.systemui.statusbar.notification.NotificationData; Loading Loading @@ -48,7 +49,8 @@ public class NotificationIconAreaController implements DarkReceiver { @Override public void onTuningChanged(String key, String newValue) { if (key.equals(LOW_PRIORITY)) { mShowLowPriority = "1".equals(newValue); mShowLowPriority = "1".equals(newValue) || !NotificationLockscreenUserManager.AUTO_DEMOTE_NOTIFICATIONS; if (mNotificationScrollLayout != null) { updateStatusBarIcons(); } Loading Loading @@ -234,7 +236,8 @@ public class NotificationIconAreaController implements DarkReceiver { public void updateStatusBarIcons() { updateIconsForLayout(entry -> entry.icon, mNotificationIcons, false /* showAmbient */, false /* showLowPriority */, true /* hideDismissed */, false /* showAmbient */, mShowLowPriority /* showLowPriority */, true /* hideDismissed */, true /* hideRepliedMessages */); } Loading