Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/BundleEntryAdapterTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ class BundleEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun isBubble() { assertThat(underTest.isBubbleCapable).isFalse() assertThat(underTest.isBubble).isFalse() } @Test Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/NotificationEntryAdapterTest.kt +9 −9 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun getRow_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading @@ -128,7 +128,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun isGroupRoot_adapter_groupSummary() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "") .setSmallIcon(R.drawable.ic_person) Loading Loading @@ -175,7 +175,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun isClearable_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading @@ -193,7 +193,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun getSummarization_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading @@ -213,7 +213,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun getIcons_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading Loading @@ -258,7 +258,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun canDragAndDrop() { val pi = Mockito.mock(PendingIntent::class.java) val pi = mock(PendingIntent::class.java) Mockito.`when`(pi.isActivity).thenReturn(true) val notification: Notification = Notification.Builder(mContext, "") Loading @@ -284,7 +284,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { val entry = NotificationEntryBuilder().setNotification(notification).build() underTest = factory.create(entry) as NotificationEntryAdapter assertThat(underTest.isBubbleCapable).isEqualTo(entry.isBubble) assertThat(underTest.isBubble).isEqualTo(entry.isBubble) } @Test Loading Loading @@ -350,7 +350,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { val notification: Notification = Notification.Builder(mContext, "") .setSmallIcon(R.drawable.ic_person) .setFullScreenIntent(Mockito.mock(PendingIntent::class.java), true) .setFullScreenIntent(mock(PendingIntent::class.java), true) .build() val entry = Loading Loading @@ -399,7 +399,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { val notification: Notification = Notification.Builder(mContext, "") .setSmallIcon(R.drawable.ic_person) .addAction(Mockito.mock(Notification.Action::class.java)) .addAction(mock(Notification.Action::class.java)) .build() val entry = NotificationEntryBuilder().setNotification(notification).build() Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java +7 −5 Original line number Diff line number Diff line Loading @@ -81,7 +81,6 @@ public final class NotificationClicker implements View.OnClickListener { mPowerInteractor.wakeUpIfDozing("NOTIFICATION_CLICK", PowerManager.WAKE_REASON_GESTURE); final ExpandableNotificationRow row = (ExpandableNotificationRow) v; final NotificationEntry entry = row.getEntry(); mLogger.logOnClick(row.getLoggingKey()); // Check if the notification is displaying the menu, if so slide notification back Loading Loading @@ -109,16 +108,16 @@ public final class NotificationClicker implements View.OnClickListener { DejankUtils.postAfterTraversal(() -> row.setJustClicked(false)); if (NotificationBundleUi.isEnabled()) { if (!row.getEntryAdapter().isBubbleCapable() && mBubblesOptional.isPresent()) { if (!row.getEntryAdapter().isBubble() && mBubblesOptional.isPresent()) { mBubblesOptional.get().collapseStack(); } row.getEntryAdapter().onEntryClicked(row); } else { if (!row.getEntryLegacy().isBubble() && mBubblesOptional.isPresent()) { mBubblesOptional.get().collapseStack(); } mNotificationActivityStarter.onNotificationClicked(row.getEntryLegacy(), row); } mNotificationActivityStarter.onNotificationClicked(entry, row); } private boolean isMenuVisible(ExpandableNotificationRow row) { Loading @@ -129,9 +128,12 @@ public final class NotificationClicker implements View.OnClickListener { * Attaches the click listener to the row if appropriate. */ public void register(ExpandableNotificationRow row, StatusBarNotification sbn) { boolean isBubble = NotificationBundleUi.isEnabled() ? row.getEntryAdapter().isBubble() : row.getEntryLegacy().isBubble(); Notification notification = sbn.getNotification(); if (notification.contentIntent != null || notification.fullScreenIntent != null || row.getEntry().isBubble()) { || isBubble) { if (NotificationBundleUi.isEnabled()) { row.setBubbleClickListener( v -> row.getEntryAdapter().onNotificationBubbleIconClicked()); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleEntryAdapter.kt +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ class BundleEntryAdapter(val entry: BundleEntry) : EntryAdapter { return false } override fun isBubbleCapable(): Boolean { override fun isBubble(): Boolean { return false } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/EntryAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public interface EntryAdapter { boolean canDragAndDrop(); boolean isBubbleCapable(); boolean isBubble(); @Nullable String getStyle(); Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/BundleEntryAdapterTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ class BundleEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun isBubble() { assertThat(underTest.isBubbleCapable).isFalse() assertThat(underTest.isBubble).isFalse() } @Test Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/NotificationEntryAdapterTest.kt +9 −9 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun getRow_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading @@ -128,7 +128,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun isGroupRoot_adapter_groupSummary() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "") .setSmallIcon(R.drawable.ic_person) Loading Loading @@ -175,7 +175,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun isClearable_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading @@ -193,7 +193,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun getSummarization_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading @@ -213,7 +213,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun getIcons_adapter() { val row = Mockito.mock(ExpandableNotificationRow::class.java) val row = mock(ExpandableNotificationRow::class.java) val notification: Notification = Notification.Builder(mContext, "").setSmallIcon(R.drawable.ic_person).build() Loading Loading @@ -258,7 +258,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { @Test @EnableFlags(NotificationBundleUi.FLAG_NAME) fun canDragAndDrop() { val pi = Mockito.mock(PendingIntent::class.java) val pi = mock(PendingIntent::class.java) Mockito.`when`(pi.isActivity).thenReturn(true) val notification: Notification = Notification.Builder(mContext, "") Loading @@ -284,7 +284,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { val entry = NotificationEntryBuilder().setNotification(notification).build() underTest = factory.create(entry) as NotificationEntryAdapter assertThat(underTest.isBubbleCapable).isEqualTo(entry.isBubble) assertThat(underTest.isBubble).isEqualTo(entry.isBubble) } @Test Loading Loading @@ -350,7 +350,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { val notification: Notification = Notification.Builder(mContext, "") .setSmallIcon(R.drawable.ic_person) .setFullScreenIntent(Mockito.mock(PendingIntent::class.java), true) .setFullScreenIntent(mock(PendingIntent::class.java), true) .build() val entry = Loading Loading @@ -399,7 +399,7 @@ class NotificationEntryAdapterTest : SysuiTestCase() { val notification: Notification = Notification.Builder(mContext, "") .setSmallIcon(R.drawable.ic_person) .addAction(Mockito.mock(Notification.Action::class.java)) .addAction(mock(Notification.Action::class.java)) .build() val entry = NotificationEntryBuilder().setNotification(notification).build() Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationClicker.java +7 −5 Original line number Diff line number Diff line Loading @@ -81,7 +81,6 @@ public final class NotificationClicker implements View.OnClickListener { mPowerInteractor.wakeUpIfDozing("NOTIFICATION_CLICK", PowerManager.WAKE_REASON_GESTURE); final ExpandableNotificationRow row = (ExpandableNotificationRow) v; final NotificationEntry entry = row.getEntry(); mLogger.logOnClick(row.getLoggingKey()); // Check if the notification is displaying the menu, if so slide notification back Loading Loading @@ -109,16 +108,16 @@ public final class NotificationClicker implements View.OnClickListener { DejankUtils.postAfterTraversal(() -> row.setJustClicked(false)); if (NotificationBundleUi.isEnabled()) { if (!row.getEntryAdapter().isBubbleCapable() && mBubblesOptional.isPresent()) { if (!row.getEntryAdapter().isBubble() && mBubblesOptional.isPresent()) { mBubblesOptional.get().collapseStack(); } row.getEntryAdapter().onEntryClicked(row); } else { if (!row.getEntryLegacy().isBubble() && mBubblesOptional.isPresent()) { mBubblesOptional.get().collapseStack(); } mNotificationActivityStarter.onNotificationClicked(row.getEntryLegacy(), row); } mNotificationActivityStarter.onNotificationClicked(entry, row); } private boolean isMenuVisible(ExpandableNotificationRow row) { Loading @@ -129,9 +128,12 @@ public final class NotificationClicker implements View.OnClickListener { * Attaches the click listener to the row if appropriate. */ public void register(ExpandableNotificationRow row, StatusBarNotification sbn) { boolean isBubble = NotificationBundleUi.isEnabled() ? row.getEntryAdapter().isBubble() : row.getEntryLegacy().isBubble(); Notification notification = sbn.getNotification(); if (notification.contentIntent != null || notification.fullScreenIntent != null || row.getEntry().isBubble()) { || isBubble) { if (NotificationBundleUi.isEnabled()) { row.setBubbleClickListener( v -> row.getEntryAdapter().onNotificationBubbleIconClicked()); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleEntryAdapter.kt +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ class BundleEntryAdapter(val entry: BundleEntry) : EntryAdapter { return false } override fun isBubbleCapable(): Boolean { override fun isBubble(): Boolean { return false } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/EntryAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public interface EntryAdapter { boolean canDragAndDrop(); boolean isBubbleCapable(); boolean isBubble(); @Nullable String getStyle(); Loading