summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2020-03-21 17:07:17 -0700
committerLucas Dupin <dupin@google.com>2020-03-22 00:12:26 +0000
commit2e7170bb21ada34a7ea11bec1f4a462bba5fe9ee (patch)
tree198b82ccb0aede12ed97b1d02376dbc2233a1458 /tests
parent25f8496e7c3eaa7c853d4713d23755cde91991ac (diff)
Set dark theme flag when initializing with Color
Users want to be able to use this flag and have been relying on WallpaperColors#fromBitmap given that flags were not parsed by the main constructor. Fixes: 151717291 Test: atest WallpaperColorsTest Change-Id: I0470a867c54756df9a758b24835a50bc67191050
Diffstat (limited to 'tests')
-rw-r--r--tests/Internal/src/android/app/WallpaperColorsTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Internal/src/android/app/WallpaperColorsTest.java b/tests/Internal/src/android/app/WallpaperColorsTest.java
index 65ff6eb1ba04..e9bac717daa1 100644
--- a/tests/Internal/src/android/app/WallpaperColorsTest.java
+++ b/tests/Internal/src/android/app/WallpaperColorsTest.java
@@ -87,6 +87,14 @@ public class WallpaperColorsTest {
+ "HINT_FROM_BITMAP.", fromBitmap);
}
+ @Test
+ public void darkMainColorSupportsDarkTheme() {
+ final Color color = Color.valueOf(Color.BLACK);
+ WallpaperColors colors = new WallpaperColors(color, null, null);
+ Assert.assertTrue("Dark theme should be supported by dark main colors.",
+ (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0);
+ }
+
/**
* WallpaperColors should not recycle bitmaps that it didn't create.
*/