summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Sheng Shih <wilsonshih@google.com> 2023-08-15 02:15:21 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-08-15 02:15:21 +0000
commite4a961789ea3f2583053090a88bc25a93ab60714 (patch)
tree5d5c96c9dfac60321f7ced998cd343038a9ee9a0
parent49cc9ce23704ae246411b1c12969ea7889c7a6f8 (diff)
parent7609de365e04e7d28e249433f2dc53f8fc4523f3 (diff)
Merge "Loose the translucent condition when estimate splash screen bg color." into udc-qpr-dev
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java4
1 files changed, 2 insertions, 2 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 dc91a11dc64f..29be34347b22 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
@@ -385,8 +385,8 @@ public class SplashscreenContentDrawer {
private static int estimateWindowBGColor(Drawable themeBGDrawable) {
final DrawableColorTester themeBGTester = new DrawableColorTester(
themeBGDrawable, DrawableColorTester.TRANSLUCENT_FILTER /* filterType */);
- if (themeBGTester.passFilterRatio() != 1) {
- // the window background is translucent, unable to draw
+ if (themeBGTester.passFilterRatio() < 0.5f) {
+ // more than half pixels of the window background is translucent, unable to draw
Slog.w(TAG, "Window background is translucent, fill background with black color");
return getSystemBGColor();
} else {