diff options
author | P.Y. Laligand <pylaligand@google.com> | 2015-05-11 15:02:07 -0700 |
---|---|---|
committer | P.Y. Laligand <pylaligand@google.com> | 2015-05-11 15:02:07 -0700 |
commit | b3b9eb3cfc5b3b3609a5d01258315798b38a5cf9 (patch) | |
tree | 9d1d777fceb08094b7accab63c4f1b135e687a2e /services/core/java/com/android/server/wm | |
parent | ed1ef7d4eb8934f6940a2e828ebd0e6878e1af89 (diff) | |
download | frameworks_base-b3b9eb3cfc5b3b3609a5d01258315798b38a5cf9.zip frameworks_base-b3b9eb3cfc5b3b3609a5d01258315798b38a5cf9.tar.gz frameworks_base-b3b9eb3cfc5b3b3609a5d01258315798b38a5cf9.tar.bz2 |
DO NOT MERGE - Display mode switches.
Knowledge of the various modes of a display is now available to apps, and they can request a specific mode for their windows.
b/18241736
Change-Id: I8eb16ff713e878512faca3ca6662254f08a9be7f
(cherry picked from commit 5c7773d86484aac5737667c604bd8fe8150c2136)
Diffstat (limited to 'services/core/java/com/android/server/wm')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 6bf68e8..06d3b22 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -691,6 +691,8 @@ public class WindowManagerService extends IWindowManager.Stub boolean mObscureApplicationContentOnSecondaryDisplays = false; float mPreferredRefreshRate = 0; + + int mPreferredModeId = 0; } final LayoutFields mInnerFields = new LayoutFields(); @@ -9713,6 +9715,10 @@ public class WindowManagerService extends IWindowManager.Stub && w.mAttrs.preferredRefreshRate != 0) { mInnerFields.mPreferredRefreshRate = w.mAttrs.preferredRefreshRate; } + if (mInnerFields.mPreferredModeId == 0 + && w.mAttrs.preferredDisplayModeId != 0) { + mInnerFields.mPreferredModeId = w.mAttrs.preferredDisplayModeId; + } } } } @@ -9846,6 +9852,7 @@ public class WindowManagerService extends IWindowManager.Stub // Reset for each display. mInnerFields.mDisplayHasContent = false; mInnerFields.mPreferredRefreshRate = 0; + mInnerFields.mPreferredModeId = 0; int repeats = 0; do { @@ -10066,6 +10073,7 @@ public class WindowManagerService extends IWindowManager.Stub mDisplayManagerInternal.setDisplayProperties(displayId, mInnerFields.mDisplayHasContent, mInnerFields.mPreferredRefreshRate, + mInnerFields.mPreferredModeId, true /* inTraversal, must call performTraversalInTrans... below */); getDisplayContentLocked(displayId).stopDimmingIfNeeded(); |