Loading packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +3 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.ViewMediatorCallback; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.dagger.DaggerSystemUIRootComponent; import com.android.systemui.dagger.DependencyProvider; import com.android.systemui.dagger.SystemUIRootComponent; Loading Loading @@ -164,7 +165,8 @@ public class SystemUIFactory { wakeUpCoordinator, keyguardBypassController, Dependency.get(NotificationMediaManager.class), Dependency.get(NotificationListener.class), Dependency.get(DozeParameters.class)); Dependency.get(DozeParameters.class), Dependency.get(BubbleController.class)); } @Module Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +12 −0 Original line number Diff line number Diff line Loading @@ -881,6 +881,18 @@ public class BubbleController implements ConfigurationController.ConfigurationLi return (isSummary && isSuppressedSummary) || isSuppressedBubble; } /** * True if: * (1) The current notification entry same as selected bubble notification entry and the * stack is currently expanded. * * False otherwise. */ public boolean isBubbleExpanded(NotificationEntry entry) { return isStackExpanded() && mBubbleData != null && mBubbleData.getSelectedBubble() != null && mBubbleData.getSelectedBubble().getKey().equals(entry.getKey()) ? true : false; } void promoteBubbleFromOverflow(Bubble bubble) { bubble.setInflateSynchronously(mInflateSynchronously); setIsBubble(bubble, /* isBubble */ true); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java +8 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import com.android.internal.util.ContrastColorUtil; import com.android.settingslib.Utils; import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.plugins.DarkIconDispatcher; import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver; import com.android.systemui.plugins.statusbar.StatusBarStateController; Loading Loading @@ -55,6 +56,7 @@ public class NotificationIconAreaController implements DarkReceiver, private final NotificationWakeUpCoordinator mWakeUpCoordinator; private final KeyguardBypassController mBypassController; private final DozeParameters mDozeParameters; private final BubbleController mBubbleController; private int mIconSize; private int mIconHPadding; Loading Loading @@ -101,7 +103,8 @@ public class NotificationIconAreaController implements DarkReceiver, KeyguardBypassController keyguardBypassController, NotificationMediaManager notificationMediaManager, NotificationListener notificationListener, DozeParameters dozeParameters) { DozeParameters dozeParameters, BubbleController bubbleController) { mStatusBar = statusBar; mContrastColorUtil = ContrastColorUtil.getInstance(context); mContext = context; Loading @@ -112,6 +115,7 @@ public class NotificationIconAreaController implements DarkReceiver, mWakeUpCoordinator = wakeUpCoordinator; wakeUpCoordinator.addListener(this); mBypassController = keyguardBypassController; mBubbleController = bubbleController; notificationListener.addNotificationSettingsListener(mSettingsListener); initializeNotificationAreaViews(context); Loading Loading @@ -291,6 +295,9 @@ public class NotificationIconAreaController implements DarkReceiver, || !entry.isPulseSuppressed())) { return false; } if (mBubbleController.isBubbleExpanded(entry)) { return false; } return true; } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationIconAreaControllerTest.java +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.testing.TestableLooper; import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.NotificationListener; import com.android.systemui.statusbar.NotificationMediaManager; Loading Loading @@ -63,6 +64,8 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase { @Mock NotificationShadeWindowView mNotificationShadeWindowView; private NotificationIconAreaController mController; @Mock private BubbleController mBubbleController; @Before public void setup() { Loading @@ -74,7 +77,7 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase { mController = new NotificationIconAreaController(mContext, mStatusBar, mStatusBarStateController, mWakeUpCoordinator, mKeyguardBypassController, mNotificationMediaManager, mListener, mDozeParameters); mNotificationMediaManager, mListener, mDozeParameters, mBubbleController); } @Test Loading Loading
packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +3 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.ViewMediatorCallback; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.dagger.DaggerSystemUIRootComponent; import com.android.systemui.dagger.DependencyProvider; import com.android.systemui.dagger.SystemUIRootComponent; Loading Loading @@ -164,7 +165,8 @@ public class SystemUIFactory { wakeUpCoordinator, keyguardBypassController, Dependency.get(NotificationMediaManager.class), Dependency.get(NotificationListener.class), Dependency.get(DozeParameters.class)); Dependency.get(DozeParameters.class), Dependency.get(BubbleController.class)); } @Module Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +12 −0 Original line number Diff line number Diff line Loading @@ -881,6 +881,18 @@ public class BubbleController implements ConfigurationController.ConfigurationLi return (isSummary && isSuppressedSummary) || isSuppressedBubble; } /** * True if: * (1) The current notification entry same as selected bubble notification entry and the * stack is currently expanded. * * False otherwise. */ public boolean isBubbleExpanded(NotificationEntry entry) { return isStackExpanded() && mBubbleData != null && mBubbleData.getSelectedBubble() != null && mBubbleData.getSelectedBubble().getKey().equals(entry.getKey()) ? true : false; } void promoteBubbleFromOverflow(Bubble bubble) { bubble.setInflateSynchronously(mInflateSynchronously); setIsBubble(bubble, /* isBubble */ true); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java +8 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import com.android.internal.util.ContrastColorUtil; import com.android.settingslib.Utils; import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.plugins.DarkIconDispatcher; import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver; import com.android.systemui.plugins.statusbar.StatusBarStateController; Loading Loading @@ -55,6 +56,7 @@ public class NotificationIconAreaController implements DarkReceiver, private final NotificationWakeUpCoordinator mWakeUpCoordinator; private final KeyguardBypassController mBypassController; private final DozeParameters mDozeParameters; private final BubbleController mBubbleController; private int mIconSize; private int mIconHPadding; Loading Loading @@ -101,7 +103,8 @@ public class NotificationIconAreaController implements DarkReceiver, KeyguardBypassController keyguardBypassController, NotificationMediaManager notificationMediaManager, NotificationListener notificationListener, DozeParameters dozeParameters) { DozeParameters dozeParameters, BubbleController bubbleController) { mStatusBar = statusBar; mContrastColorUtil = ContrastColorUtil.getInstance(context); mContext = context; Loading @@ -112,6 +115,7 @@ public class NotificationIconAreaController implements DarkReceiver, mWakeUpCoordinator = wakeUpCoordinator; wakeUpCoordinator.addListener(this); mBypassController = keyguardBypassController; mBubbleController = bubbleController; notificationListener.addNotificationSettingsListener(mSettingsListener); initializeNotificationAreaViews(context); Loading Loading @@ -291,6 +295,9 @@ public class NotificationIconAreaController implements DarkReceiver, || !entry.isPulseSuppressed())) { return false; } if (mBubbleController.isBubbleExpanded(entry)) { return false; } return true; } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationIconAreaControllerTest.java +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.testing.TestableLooper; import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.NotificationListener; import com.android.systemui.statusbar.NotificationMediaManager; Loading Loading @@ -63,6 +64,8 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase { @Mock NotificationShadeWindowView mNotificationShadeWindowView; private NotificationIconAreaController mController; @Mock private BubbleController mBubbleController; @Before public void setup() { Loading @@ -74,7 +77,7 @@ public class NotificationIconAreaControllerTest extends SysuiTestCase { mController = new NotificationIconAreaController(mContext, mStatusBar, mStatusBarStateController, mWakeUpCoordinator, mKeyguardBypassController, mNotificationMediaManager, mListener, mDozeParameters); mNotificationMediaManager, mListener, mDozeParameters, mBubbleController); } @Test Loading