Improve the rendering speed of the lock screen by reporting the appropriate opacity for the background wallpaper.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user