summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Xiaowen Lei <xilei@google.com> 2025-01-06 14:32:16 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-01-06 14:32:16 -0800
commit55621755709b81a89bc01e02f5557a1060d7b51a (patch)
tree5d67fa4c1e045f62f548c7d4a6d32101af9cec81
parent0488c8515fc0ee22c7eff219384cb1a3864ac9db (diff)
parente2c0f3ff6c25bb6f888a7617cda57dc3b23fe010 (diff)
Merge "Update faded color opacity in NotificationProgressBarTest." into main
-rw-r--r--core/tests/coretests/src/com/android/internal/widget/NotificationProgressBarTest.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/core/tests/coretests/src/com/android/internal/widget/NotificationProgressBarTest.java b/core/tests/coretests/src/com/android/internal/widget/NotificationProgressBarTest.java
index 5613caf4427e..d26bb35e5481 100644
--- a/core/tests/coretests/src/com/android/internal/widget/NotificationProgressBarTest.java
+++ b/core/tests/coretests/src/com/android/internal/widget/NotificationProgressBarTest.java
@@ -120,7 +120,9 @@ public class NotificationProgressBarTest {
List<Part> parts = NotificationProgressBar.processAndConvertToDrawableParts(
segments, points, progress, progressMax, isStyledByProgress);
- int fadedRed = 0x7FFF0000;
+ // Colors with 40% opacity
+ int fadedRed = 0x66FF0000;
+
List<Part> expected = new ArrayList<>(List.of(new Segment(1f, fadedRed, true)));
assertThat(parts).isEqualTo(expected);
@@ -199,8 +201,8 @@ public class NotificationProgressBarTest {
List<Part> parts = NotificationProgressBar.processAndConvertToDrawableParts(
segments, points, progress, progressMax, isStyledByProgress);
- // Colors with 50% opacity
- int fadedGreen = 0x7F00FF00;
+ // Colors with 40% opacity
+ int fadedGreen = 0x6600FF00;
List<Part> expected = new ArrayList<>(List.of(
new Segment(0.50f, Color.RED),
@@ -223,9 +225,9 @@ public class NotificationProgressBarTest {
int progressMax = 100;
boolean isStyledByProgress = true;
- // Colors with 50% opacity
- int fadedBlue = 0x7F0000FF;
- int fadedYellow = 0x7FFFFF00;
+ // Colors with 40% opacity
+ int fadedBlue = 0x660000FF;
+ int fadedYellow = 0x66FFFF00;
List<Part> expected = new ArrayList<>(List.of(
new Segment(0.15f, Color.BLUE),
@@ -261,9 +263,9 @@ public class NotificationProgressBarTest {
List<Part> parts = NotificationProgressBar.processAndConvertToDrawableParts(
segments, points, progress, progressMax, isStyledByProgress);
- // Colors with 50% opacity
- int fadedGreen = 0x7F00FF00;
- int fadedYellow = 0x7FFFFF00;
+ // Colors with 40% opacity
+ int fadedGreen = 0x6600FF00;
+ int fadedYellow = 0x66FFFF00;
List<Part> expected = new ArrayList<>(List.of(
new Segment(0.15f, Color.RED),