diff options
author | Adam Powell <adamp@google.com> | 2013-10-11 03:09:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-11 03:09:35 +0000 |
commit | 1db8cf12a985425a73d24875d9d308c14c0b4359 (patch) | |
tree | f098dc9357924558bc273074880c932f51d3ea51 | |
parent | bea75db9df6ed19c483d9a7fe86ec820d3c1484f (diff) | |
parent | 9471907b5b756b5220e6b50df4529147c01798dc (diff) | |
download | frameworks_base-1db8cf12a985425a73d24875d9d308c14c0b4359.zip frameworks_base-1db8cf12a985425a73d24875d9d308c14c0b4359.tar.gz frameworks_base-1db8cf12a985425a73d24875d9d308c14c0b4359.tar.bz2 |
Merge "Toggle wallpaper window flag when setting custom keyguard background" into klp-dev
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java index 58ca0b0..d37aaaf 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java @@ -85,6 +85,7 @@ public class KeyguardViewManager { public void onSetBackground(Bitmap bmp) { mKeyguardHost.setCustomBackground(bmp != null ? new BitmapDrawable(mContext.getResources(), bmp) : null); + updateShowWallpaper(bmp == null); } }; @@ -379,6 +380,16 @@ public class KeyguardViewManager { mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); } + void updateShowWallpaper(boolean show) { + if (show) { + mWindowLayoutParams.flags |= WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; + } else { + mWindowLayoutParams.flags &= ~WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; + } + + mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); + } + public void setNeedsInput(boolean needsInput) { mNeedsInput = needsInput; if (mWindowLayoutParams != null) { @@ -489,6 +500,7 @@ public class KeyguardViewManager { lastView.cleanUp(); // Let go of any large bitmaps. mKeyguardHost.setCustomBackground(null); + updateShowWallpaper(true); mKeyguardHost.removeView(lastView); } } |