From cc9f52f94349ce34489a5a2c803271e53961286b Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 15 Sep 2009 18:23:59 -0700 Subject: [PATCH] make the window-shade use an opaque surface if possible --- .../com/android/server/status/StatusBarService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java index d680b8a5ba05f..83552dd8b09e8 100644 --- a/services/java/com/android/server/status/StatusBarService.java +++ b/services/java/com/android/server/status/StatusBarService.java @@ -1490,10 +1490,13 @@ public class StatusBarService extends IStatusBar.Stub /// ---------- Expanded View -------------- pixelFormat = PixelFormat.TRANSLUCENT; - if (false) { - bg = mExpandedView.getBackground(); - if (bg != null) { - pixelFormat = bg.getOpacity(); + bg = mExpandedView.getBackground(); + if (bg != null) { + pixelFormat = bg.getOpacity(); + if (pixelFormat != PixelFormat.TRANSLUCENT) { + // we want good-looking gradients, so we force a 8-bits per + // pixel format. + pixelFormat = PixelFormat.RGBX_8888; } }