From 88400d3a31139c40c4014faf86c243647087ef6c Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Sun, 30 Sep 2012 12:35:45 -0700 Subject: Add flag for displaying non-user's Windows to user. Created a new flag that indicates that a window should be shown to all users. For the flag to be valid the owner of the window must have system permissions. Also separated system window types into those that show to all users (e.g. StatusBar, Keyguard, ....) and those that appear only to the owning users (e.g. Drag, ANR, TOAST, ...). Those that appear only to their owner can override their default behavior using the new flag (e.g. LowBattery). Fixes bug 7211965. Change-Id: I1fdca25d57b7b523f0c7f8bceb819af656c388d4 --- core/java/android/view/WindowManagerPolicy.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/java/android/view/WindowManagerPolicy.java') diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index 82f07c7..2d399a2 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -500,6 +500,16 @@ public interface WindowManagerPolicy { public int checkAddPermission(WindowManager.LayoutParams attrs); /** + * Check permissions when adding a window. + * + * @param attrs The window's LayoutParams. + * + * @return True if the window may only be shown to the current user, false if the window can + * be shown on all users' windows. + */ + public boolean checkShowToOwnerOnly(WindowManager.LayoutParams attrs); + + /** * Sanitize the layout parameters coming from a client. Allows the policy * to do things like ensure that windows of a specific type can't take * input focus. -- cgit v1.1