diff options
| author | 2023-03-08 06:48:54 +0000 | |
|---|---|---|
| committer | 2023-03-08 06:48:54 +0000 | |
| commit | f91426989f8f3aab5962724d16d03e3621eca8ee (patch) | |
| tree | d9eb8d3fca5e11f126537ee67fd3b390ebae1183 | |
| parent | d2b0342f37edade88ef79e9e35afc641c1eae9bf (diff) | |
| parent | dca05aeb15d34553cb76b49f6ef3052dbaa807f0 (diff) | |
Merge "Fixes a wrong cast position." into udc-dev
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java index 79cd891741d6..dc91a11dc64f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java @@ -384,10 +384,10 @@ public class SplashscreenContentDrawer { private static int estimateWindowBGColor(Drawable themeBGDrawable) { final DrawableColorTester themeBGTester = new DrawableColorTester( - themeBGDrawable, DrawableColorTester.TRANSPARENT_FILTER /* filterType */); - if (themeBGTester.passFilterRatio() == 0) { - // the window background is transparent, unable to draw - Slog.w(TAG, "Window background is transparent, fill background with black color"); + themeBGDrawable, DrawableColorTester.TRANSLUCENT_FILTER /* filterType */); + if (themeBGTester.passFilterRatio() != 1) { + // the window background is translucent, unable to draw + Slog.w(TAG, "Window background is translucent, fill background with black color"); return getSystemBGColor(); } else { return themeBGTester.getDominateColor(); @@ -870,7 +870,7 @@ public class SplashscreenContentDrawer { @Override public float passFilterRatio() { final int alpha = mColorDrawable.getAlpha(); - return (float) (alpha / 255); + return alpha / 255.0f; } @Override |