diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-10-15 00:54:27 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-10-15 17:10:55 -0700 |
commit | 3b2b354ec1ba070eae13391d004d97a3e1403050 (patch) | |
tree | e2647c9a8797a4b3542deab7d1cb766967b35879 /policy/src | |
parent | 1edb2bda37726ba6bc6feeafad25ea51b1cacaee (diff) | |
download | frameworks_base-3b2b354ec1ba070eae13391d004d97a3e1403050.zip frameworks_base-3b2b354ec1ba070eae13391d004d97a3e1403050.tar.gz frameworks_base-3b2b354ec1ba070eae13391d004d97a3e1403050.tar.bz2 |
Add support for secure system overlays.
Manual merge from Gingerbread.
This change adds a new window type for secure system overlays
created by the system itself from non-secure system overlays that
might be created by applications that have the system alert permission.
Secure views ignore the presence of secure system overlays.
Bug: 3098519
Change-Id: Id876736fd8bf332ff9a5428bde59f5268aa49c3a
Diffstat (limited to 'policy/src')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index c6898d4..2cd615d 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -96,6 +96,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_PHONE; import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE; import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR; +import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG; @@ -163,6 +164,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final int DRAG_LAYER = 16; // things in here CAN NOT take focus, but are shown on top of everything else. static final int SYSTEM_OVERLAY_LAYER = 17; + static final int SECURE_SYSTEM_OVERLAY_LAYER = 18; static final int APPLICATION_MEDIA_SUBLAYER = -2; static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1; @@ -691,7 +693,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowManager.LayoutParams lp = new WindowManager.LayoutParams( WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT); - lp.type = WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY; + lp.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; lp.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE| @@ -787,6 +789,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void adjustWindowParamsLw(WindowManager.LayoutParams attrs) { switch (attrs.type) { case TYPE_SYSTEM_OVERLAY: + case TYPE_SECURE_SYSTEM_OVERLAY: case TYPE_TOAST: // These types of windows can't receive input events. attrs.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE @@ -864,6 +867,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { return INPUT_METHOD_DIALOG_LAYER; case TYPE_SYSTEM_OVERLAY: return SYSTEM_OVERLAY_LAYER; + case TYPE_SECURE_SYSTEM_OVERLAY: + return SECURE_SYSTEM_OVERLAY_LAYER; case TYPE_PRIORITY_PHONE: return PRIORITY_PHONE_LAYER; case TYPE_TOAST: |