From 9593e0a0073d77ab65cc97156da4d0e890e4cf27 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 11 May 2009 15:28:49 -0700 Subject: [PATCH] Improve the rendering speed of the lock screen by reporting the appropriate opacity for the background wallpaper. --- .../android/internal/policy/impl/LockPatternKeyguardView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java index 1758deb4c5e4f..6a1c2794a76f9 100644 --- a/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -590,9 +590,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase { */ static private class FastBitmapDrawable extends Drawable { private Bitmap mBitmap; + private int mOpacity; private FastBitmapDrawable(Bitmap bitmap) { mBitmap = bitmap; + mOpacity = mBitmap.hasAlpha() ? PixelFormat.TRANSLUCENT : PixelFormat.OPAQUE; } @Override @@ -606,7 +608,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { @Override public int getOpacity() { - return PixelFormat.TRANSLUCENT; + return mOpacity; } @Override