summaryrefslogtreecommitdiffstats
path: root/policy/src/com/android
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-08-28 03:27:37 -0700
committerJeff Brown <jeffbrown@google.com>2012-08-29 15:34:17 -0700
commitbd6e1500aedc5461e832f69e76341bff0e55fa2b (patch)
treea7f6e0a3524872002f2904cc43d926166c3c4515 /policy/src/com/android
parentc53abc4d42a707caddf7ec9bb7d041125a09dbd7 (diff)
downloadframeworks_base-bd6e1500aedc5461e832f69e76341bff0e55fa2b.zip
frameworks_base-bd6e1500aedc5461e832f69e76341bff0e55fa2b.tar.gz
frameworks_base-bd6e1500aedc5461e832f69e76341bff0e55fa2b.tar.bz2
Add initial multi-display support.
Split the DisplayManager into two parts. One part is bound to a Context and takes care of Display compatibility and caching Display objects on behalf of the Context. The other part is global and takes care of communicating with the DisplayManagerService, handling callbacks, and caching DisplayInfo objects on behalf of the process. Implemented support for enumerating Displays and getting callbacks when displays are added, removed or changed. Elaborated the roles of DisplayManagerService, DisplayAdapter, and DisplayDevice. We now support having multiple display adapters registered, each of which can register multiple display devices and configure them dynamically. Added an OverlayDisplayAdapter which is used to simulate secondary displays by means of overlay windows. Different configurations of overlays can be selected using a new setting in the Developer Settings panel. The overlays can be repositioned and resized by the user for convenience. At the moment, all displays are mirrors of display 0 and no display transformations are applied. This will be improved in future patches. Refactored the way that the window manager creates its threads. The OverlayDisplayAdapter needs to be able to use hardware acceleration so it must share the same UI thread as the Keyguard and window manager policy. We now handle this explicitly as part of starting up the system server. This puts us in a better position to consider how we might want to share (or not share) Loopers among components. Overlay displays are disabled when in safe mode or in only-core mode to reduce the number of dependencies started in these modes. Change-Id: Ic2a661d5448dde01b095ab150697cb6791d69bb5
Diffstat (limited to 'policy/src/com/android')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 209ad38..65e8560 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -108,6 +108,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVE
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG;
+import static android.view.WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_DRAG;
import static android.view.WindowManager.LayoutParams.TYPE_DREAM;
import static android.view.WindowManager.LayoutParams.TYPE_HIDDEN_NAV_CONSUMER;
@@ -218,14 +219,16 @@ public class PhoneWindowManager implements WindowManagerPolicy {
static final int NAVIGATION_BAR_PANEL_LAYER = 20;
// system-level error dialogs
static final int SYSTEM_ERROR_LAYER = 21;
+ // used to simulate secondary display devices
+ static final int DISPLAY_OVERLAY_LAYER = 22;
// the drag layer: input for drag-and-drop is associated with this window,
// which sits above all other focusable windows
- static final int DRAG_LAYER = 22;
- static final int SECURE_SYSTEM_OVERLAY_LAYER = 23;
- static final int BOOT_PROGRESS_LAYER = 24;
+ static final int DRAG_LAYER = 23;
+ static final int SECURE_SYSTEM_OVERLAY_LAYER = 24;
+ static final int BOOT_PROGRESS_LAYER = 25;
// the (mouse) pointer layer
- static final int POINTER_LAYER = 25;
- static final int HIDDEN_NAV_CONSUMER_LAYER = 26;
+ static final int POINTER_LAYER = 26;
+ static final int HIDDEN_NAV_CONSUMER_LAYER = 27;
static final int APPLICATION_MEDIA_SUBLAYER = -2;
static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = -1;
@@ -1327,6 +1330,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return SCREENSAVER_LAYER;
case TYPE_UNIVERSE_BACKGROUND:
return UNIVERSE_BACKGROUND_LAYER;
+ case TYPE_DISPLAY_OVERLAY:
+ return DISPLAY_OVERLAY_LAYER;
}
Log.e(TAG, "Unknown window type: " + type);
return APPLICATION_LAYER;