Merge "Update display contents when metrics change" into oc-dev

am: d6f0b0fc4f

Change-Id: I808ab4d68954773ba8c8691478d9fe47e1e2378f
This commit is contained in:
Andrii Kulian
2017-04-04 01:49:35 +00:00
committed by android-build-merger
6 changed files with 109 additions and 11 deletions

View File

@@ -101,6 +101,16 @@ public abstract class DisplayManagerInternal {
public abstract void setDisplayInfoOverrideFromWindowManager(
int displayId, DisplayInfo info);
/**
* Get current display info without override from WindowManager.
* Current implementation of LogicalDisplay#getDisplayInfoLocked() always returns display info
* with overrides from WM if set. This method can be used for getting real display size without
* overrides to determine if real changes to display metrics happened.
* @param displayId Id of the target display.
* @param outInfo {@link DisplayInfo} to fill.
*/
public abstract void getNonOverrideDisplayInfo(int displayId, DisplayInfo outInfo);
/**
* Called by the window manager to perform traversals while holding a
* surface flinger transaction.

View File

@@ -50,7 +50,7 @@ import java.util.Arrays;
* <li>The real display area specifies the part of the display that contains content
* including the system decorations. Even so, the real display area may be smaller than the
* physical size of the display if the window manager is emulating a smaller display
* using (adb shell am display-size). Use the following methods to query the
* using (adb shell wm size). Use the following methods to query the
* real display area: {@link #getRealSize}, {@link #getRealMetrics}.</li>
* </ul>
* </p><p>
@@ -947,7 +947,7 @@ public final class Display {
* The size is adjusted based on the current rotation of the display.
* </p><p>
* The real size may be smaller than the physical size of the screen when the
* window manager is emulating a smaller display (using adb shell am display-size).
* window manager is emulating a smaller display (using adb shell wm size).
* </p>
*
* @param outSize Set to the real size of the display.