diff options
author | Jeff Brown <jeffbrown@google.com> | 2013-08-07 14:13:37 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2013-08-07 14:33:50 -0700 |
commit | ef981a40aa63069dc115b216ce38d1dd939dc64c (patch) | |
tree | 05c8b9ea8de1ad4d797d397f30e00ab6e031a65a /services/java/com/android/server/display/DisplayManagerService.java | |
parent | 18ec40c44c936fd5146133ccc7446a4cd860b527 (diff) |
Fix propagation of display overscan information.
Fix several problems in the way that the overscan was plumbed in
which could result in information not being delivered to applications.
There was also a violation of certain invariants regarding the
immutability of returned DisplayInfo objects.
Bug: 10213771
Change-Id: I21184a14305e44278b5e81353bf95d511e8517fb
Diffstat (limited to 'services/java/com/android/server/display/DisplayManagerService.java')
-rw-r--r-- | services/java/com/android/server/display/DisplayManagerService.java | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/services/java/com/android/server/display/DisplayManagerService.java b/services/java/com/android/server/display/DisplayManagerService.java index 20db4cd544ce..4b3463cfb20f 100644 --- a/services/java/com/android/server/display/DisplayManagerService.java +++ b/services/java/com/android/server/display/DisplayManagerService.java @@ -314,6 +314,9 @@ public final class DisplayManagerService extends IDisplayManager.Stub { * to the display information synchronously so that applications will immediately * observe the new state. * + * NOTE: This method must be the only entry point by which the window manager + * influences the logical configuration of displays. + * * @param displayId The logical display id. * @param info The new data to be stored. */ @@ -322,9 +325,7 @@ public final class DisplayManagerService extends IDisplayManager.Stub { synchronized (mSyncRoot) { LogicalDisplay display = mLogicalDisplays.get(displayId); if (display != null) { - mTempDisplayInfo.copyFrom(display.getDisplayInfoLocked()); - display.setDisplayInfoOverrideFromWindowManagerLocked(info); - if (!mTempDisplayInfo.equals(display.getDisplayInfoLocked())) { + if (display.setDisplayInfoOverrideFromWindowManagerLocked(info)) { sendDisplayEventLocked(displayId, DisplayManagerGlobal.EVENT_DISPLAY_CHANGED); scheduleTraversalLocked(false); } @@ -333,18 +334,6 @@ public final class DisplayManagerService extends IDisplayManager.Stub { } /** - * Sets the overscan insets for a particular display. - */ - public void setOverscan(int displayId, int left, int top, int right, int bottom) { - synchronized (mSyncRoot) { - LogicalDisplay display = mLogicalDisplays.get(displayId); - if (display != null) { - display.setOverscan(left, top, right, bottom); - } - } - } - - /** * Called by the window manager to perform traversals while holding a * surface flinger transaction. */ |