summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yining Liu <liuyining@google.com> 2024-08-15 22:27:51 +0000
committer Yining Liu <liuyining@google.com> 2024-08-15 22:33:39 +0000
commitb4173a654ba8d7a4dce037741337e2235fb8f94e (patch)
tree233b71165204810e4d3bb1ca6e96c004e40af83f
parent51c377ec24dd8ec7503ed4b1385257a1456f8b21 (diff)
Fix test failure
Fix test failure by adding an EnableFlag annotation. The test was failing because when the notification_content_alpha_optimization flag is disabled, there's no call to getAlpha() when the verification requires one. Bug: 355132257 Bug: 292024656 Change-Id: If43249218cb7bc103e412832ade38a1246897673 Fix: 359933016 Test: atest NotificationSwipeHelperTest Flag: com.android.systemui.notification_content_alpha_optimization
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java
index 63192f35ff40..95db95cd288b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationSwipeHelperTest.java
@@ -674,6 +674,7 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
}
@Test
+ @EnableFlags(NotificationContentAlphaOptimization.FLAG_NAME)
public void testForceResetSwipeStateDoesNothingIfTranslationIsZeroAndAlphaIsOne() {
doReturn(FAKE_ROW_WIDTH).when(mNotificationRow).getMeasuredWidth();
doReturn(0f).when(mNotificationRow).getTranslationX();