diff options
author | Adrian Roos <roosa@google.com> | 2014-04-09 21:04:11 +0200 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2014-04-09 21:07:04 +0200 |
commit | 3850211afbf195d2bb5299a05a82a13e052b6033 (patch) | |
tree | 85dacc96cd68aab91ed1f3a146bfd7b04ab66671 /policy | |
parent | 770f9f813f576aa183b4a3997f7007f590405598 (diff) | |
download | frameworks_base-3850211afbf195d2bb5299a05a82a13e052b6033.zip frameworks_base-3850211afbf195d2bb5299a05a82a13e052b6033.tar.gz frameworks_base-3850211afbf195d2bb5299a05a82a13e052b6033.tar.bz2 |
Protect WindowManager's PRIVATE_FLAG_KEYGUARD
Enforce that only status bar can use the new keyguard flag.
Bug: 13635952
Change-Id: I807ffbb1e431fa187f22d030331374eb61dedcf3
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index b0d50d2..d232724 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1362,6 +1362,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { } break; } + + if (attrs.type != TYPE_STATUS_BAR) { + // The status bar is the only window allowed to exhibit keyguard behavior. + attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; + } } void readLidState() { |