File tree 1 file changed +12
-0
lines changed
packages/Keyguard/src/com/android/keyguard
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ public class KeyguardViewManager {
85
85
public void onSetBackground (Bitmap bmp ) {
86
86
mKeyguardHost .setCustomBackground (bmp != null ?
87
87
new BitmapDrawable (mContext .getResources (), bmp ) : null );
88
+ updateShowWallpaper (bmp == null );
88
89
}
89
90
};
90
91
@@ -379,6 +380,16 @@ private void maybeEnableScreenRotation(boolean enableScreenRotation) {
379
380
mViewManager .updateViewLayout (mKeyguardHost , mWindowLayoutParams );
380
381
}
381
382
383
+ void updateShowWallpaper (boolean show ) {
384
+ if (show ) {
385
+ mWindowLayoutParams .flags |= WindowManager .LayoutParams .FLAG_SHOW_WALLPAPER ;
386
+ } else {
387
+ mWindowLayoutParams .flags &= ~WindowManager .LayoutParams .FLAG_SHOW_WALLPAPER ;
388
+ }
389
+
390
+ mViewManager .updateViewLayout (mKeyguardHost , mWindowLayoutParams );
391
+ }
392
+
382
393
public void setNeedsInput (boolean needsInput ) {
383
394
mNeedsInput = needsInput ;
384
395
if (mWindowLayoutParams != null ) {
@@ -489,6 +500,7 @@ public void run() {
489
500
lastView .cleanUp ();
490
501
// Let go of any large bitmaps.
491
502
mKeyguardHost .setCustomBackground (null );
503
+ updateShowWallpaper (true );
492
504
mKeyguardHost .removeView (lastView );
493
505
}
494
506
}
You can’t perform that action at this time.
0 commit comments