diff options
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(); |