From 17dd6ccc75a51bda913c4c3cb1f186508835af1a Mon Sep 17 00:00:00 2001 From: Hongwei Wang Date: Thu, 4 May 2023 17:13:42 -0700 Subject: [PATCH] Enable dither for DismissView It otherwise causes banding on devices with a small color palette. Bug: 274938944 Test: Look for banding with maximum brightness and dark background Test: Before https://screenshot.googleplex.com/8kHhVcps35MKqDj.png Test: After https://screenshot.googleplex.com/Az5c9ykirCQpMXi.png Change-Id: I62a10a8e9c7f2e8293b93f44d9f4d2fedfbc428a --- .../Shell/src/com/android/wm/shell/bubbles/DismissView.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissView.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissView.kt index ab194dfb3ce96..67ecb915e0981 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissView.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/DismissView.kt @@ -144,6 +144,7 @@ class DismissView(context: Context) : FrameLayout(context) { val gd = GradientDrawable( GradientDrawable.Orientation.BOTTOM_TOP, intArrayOf(gradientColorWithAlpha, Color.TRANSPARENT)) + gd.setDither(true) gd.setAlpha(0) return gd }