Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.testing.TestableLooper.RunWithLooper import android.view.View import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.res.R import com.android.systemui.statusbar.notification.FakeShadowView Loading Loading @@ -69,6 +70,9 @@ class ActivatableNotificationViewTest : SysuiTestCase() { fun testBackgroundBehaviors() { // Color starts with the normal color mView.updateBackgroundColors() if (Flags.notificationRowTransparency()) { mNormalColor = mView.currentBackgroundTint } assertThat(mView.currentBackgroundTint).isEqualTo(mNormalColor) // Setting a tint changes the background to that color specifically Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java +9 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ import android.graphics.drawable.Drawable; import android.os.UserHandle; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.service.notification.StatusBarNotification; import android.testing.TestableLooper; import android.testing.TestableLooper.RunWithLooper; import android.util.DisplayMetrics; Loading Loading @@ -984,10 +985,17 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { public void isExpanded_promotedNotificationAllowOnKeyguard_expanded() throws Exception { // GIVEN final ExpandableNotificationRow row = mNotificationTestHelper.createRow(); final StatusBarNotification sbn = mock(StatusBarNotification.class); final Notification notification = mock(Notification.class); NotificationEntry entry = mock(NotificationEntry.class); when(entry.getSbn()).thenReturn(sbn); when(sbn.getNotification()).thenReturn(notification); when(notification.isColorized()).thenReturn(false); when(entry.isPromotedOngoing()).thenReturn(true); row.setEntryLegacy(entry); setRowPromotedOngoing(row); row.setEntryLegacy(entry); row.setOnKeyguard(true); // THEN Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.testing.TestableLooper.RunWithLooper import android.view.View import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.res.R import com.android.systemui.statusbar.notification.FakeShadowView Loading Loading @@ -69,6 +70,9 @@ class ActivatableNotificationViewTest : SysuiTestCase() { fun testBackgroundBehaviors() { // Color starts with the normal color mView.updateBackgroundColors() if (Flags.notificationRowTransparency()) { mNormalColor = mView.currentBackgroundTint } assertThat(mView.currentBackgroundTint).isEqualTo(mNormalColor) // Setting a tint changes the background to that color specifically Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java +9 −1 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ import android.graphics.drawable.Drawable; import android.os.UserHandle; import android.platform.test.annotations.DisableFlags; import android.platform.test.annotations.EnableFlags; import android.service.notification.StatusBarNotification; import android.testing.TestableLooper; import android.testing.TestableLooper.RunWithLooper; import android.util.DisplayMetrics; Loading Loading @@ -984,10 +985,17 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { public void isExpanded_promotedNotificationAllowOnKeyguard_expanded() throws Exception { // GIVEN final ExpandableNotificationRow row = mNotificationTestHelper.createRow(); final StatusBarNotification sbn = mock(StatusBarNotification.class); final Notification notification = mock(Notification.class); NotificationEntry entry = mock(NotificationEntry.class); when(entry.getSbn()).thenReturn(sbn); when(sbn.getNotification()).thenReturn(notification); when(notification.isColorized()).thenReturn(false); when(entry.isPromotedOngoing()).thenReturn(true); row.setEntryLegacy(entry); setRowPromotedOngoing(row); row.setEntryLegacy(entry); row.setOnKeyguard(true); // THEN Loading