Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +19 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.NotificationVisibility; import com.android.systemui.Dumpable; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.NotificationLifetimeExtender; import com.android.systemui.statusbar.NotificationListener; Loading Loading @@ -189,6 +190,8 @@ public class NotificationEntryManager implements } } private final Lazy<BubbleController> mBubbleControllerLazy; /** * Injected constructor. See {@link NotificationsModule}. */ Loading @@ -201,6 +204,7 @@ public class NotificationEntryManager implements Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { mLogger = logger; mGroupManager = groupManager; Loading @@ -211,6 +215,7 @@ public class NotificationEntryManager implements mRemoteInputManagerLazy = notificationRemoteInputManagerLazy; mLeakDetector = leakDetector; mFgsFeatureController = fgsFeatureController; mBubbleControllerLazy = bubbleController; } /** Once called, the NEM will start processing notification events from system server. */ Loading Loading @@ -920,8 +925,20 @@ public class NotificationEntryManager implements /** * @return {@code true} if there is at least one notification that should be visible right now */ public boolean hasActiveNotifications() { return mReadOnlyNotifications.size() != 0; public boolean hasVisibleNotifications() { if (mReadOnlyNotifications.size() == 0) { return false; } // Filter out suppressed notifications, which are active notifications backing a bubble // but are not present in the shade for (NotificationEntry e : mSortedAndFiltered) { if (!mBubbleControllerLazy.get().isBubbleNotificationSuppressedFromShade(e)) { return true; } } return false; } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ public interface NotificationsModule { Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { return new NotificationEntryManager( logger, Loading @@ -97,6 +98,7 @@ public interface NotificationsModule { notificationRowBinderLazy, notificationRemoteInputManagerLazy, leakDetector, bubbleController, fgsFeatureController); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +1 −1 Original line number Diff line number Diff line Loading @@ -6580,7 +6580,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd if (mFeatureFlags.isNewNotifPipelineRenderingEnabled()) { return !mNotifPipeline.getShadeList().isEmpty(); } else { return mEntryManager.hasActiveNotifications(); return mEntryManager.hasVisibleNotifications(); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LightsOutNotifController.java +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ public class LightsOutNotifController { } private boolean hasActiveNotifications() { return mEntryManager.hasActiveNotifications(); return mEntryManager.hasVisibleNotifications(); } @VisibleForTesting Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -3003,7 +3003,7 @@ public class NotificationPanelViewController extends PanelViewController { private void updateShowEmptyShadeView() { boolean showEmptyShadeView = mBarState != StatusBarState.KEYGUARD && !mEntryManager.hasActiveNotifications(); mBarState != StatusBarState.KEYGUARD && !mEntryManager.hasVisibleNotifications(); showEmptyShadeView(showEmptyShadeView); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +19 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.NotificationVisibility; import com.android.systemui.Dumpable; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.NotificationLifetimeExtender; import com.android.systemui.statusbar.NotificationListener; Loading Loading @@ -189,6 +190,8 @@ public class NotificationEntryManager implements } } private final Lazy<BubbleController> mBubbleControllerLazy; /** * Injected constructor. See {@link NotificationsModule}. */ Loading @@ -201,6 +204,7 @@ public class NotificationEntryManager implements Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { mLogger = logger; mGroupManager = groupManager; Loading @@ -211,6 +215,7 @@ public class NotificationEntryManager implements mRemoteInputManagerLazy = notificationRemoteInputManagerLazy; mLeakDetector = leakDetector; mFgsFeatureController = fgsFeatureController; mBubbleControllerLazy = bubbleController; } /** Once called, the NEM will start processing notification events from system server. */ Loading Loading @@ -920,8 +925,20 @@ public class NotificationEntryManager implements /** * @return {@code true} if there is at least one notification that should be visible right now */ public boolean hasActiveNotifications() { return mReadOnlyNotifications.size() != 0; public boolean hasVisibleNotifications() { if (mReadOnlyNotifications.size() == 0) { return false; } // Filter out suppressed notifications, which are active notifications backing a bubble // but are not present in the shade for (NotificationEntry e : mSortedAndFiltered) { if (!mBubbleControllerLazy.get().isBubbleNotificationSuppressedFromShade(e)) { return true; } } return false; } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ public interface NotificationsModule { Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { return new NotificationEntryManager( logger, Loading @@ -97,6 +98,7 @@ public interface NotificationsModule { notificationRowBinderLazy, notificationRemoteInputManagerLazy, leakDetector, bubbleController, fgsFeatureController); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +1 −1 Original line number Diff line number Diff line Loading @@ -6580,7 +6580,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd if (mFeatureFlags.isNewNotifPipelineRenderingEnabled()) { return !mNotifPipeline.getShadeList().isEmpty(); } else { return mEntryManager.hasActiveNotifications(); return mEntryManager.hasVisibleNotifications(); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LightsOutNotifController.java +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ public class LightsOutNotifController { } private boolean hasActiveNotifications() { return mEntryManager.hasActiveNotifications(); return mEntryManager.hasVisibleNotifications(); } @VisibleForTesting Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +1 −1 Original line number Diff line number Diff line Loading @@ -3003,7 +3003,7 @@ public class NotificationPanelViewController extends PanelViewController { private void updateShowEmptyShadeView() { boolean showEmptyShadeView = mBarState != StatusBarState.KEYGUARD && !mEntryManager.hasActiveNotifications(); mBarState != StatusBarState.KEYGUARD && !mEntryManager.hasVisibleNotifications(); showEmptyShadeView(showEmptyShadeView); } Loading