summaryrefslogtreecommitdiff
path: root/core/java/android/view/Display.java
diff options
context:
space:
mode:
authorAndrii Kulian <akulian@google.com>2020-03-05 19:34:43 -0800
committerCharles Chen <charlesccchen@google.com>2020-03-24 17:05:50 +0800
commit0be1d67b681982e20f87359a810ba6c94e438378 (patch)
tree2bbe898836e47012ec269d2f5309f3741ccfe36a /core/java/android/view/Display.java
parent8f36aba1fbd92561475487a81bea71dc1c85e2f6 (diff)
Report bounds instead of size in WindowMetrics
Use case: Jetpack WM will use them to get the location of windows on screen and compute the display feature positions in window coordinate space. Bug: 150908045 Test: atest FrameworksCoreTests:WindowMetricsTest Test: atest CtsWindowManagerDeviceTestCases:WindowMetricsTests Change-Id: Ia08950cd5df35971408e8b17bb27d97d29d0ab9b Exempt-From-Owner-Approval: API change
Diffstat (limited to 'core/java/android/view/Display.java')
-rw-r--r--core/java/android/view/Display.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index dffcafe1de0e..0ccb1e055c46 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -57,8 +57,8 @@ import java.util.List;
* <li>The application display area specifies the part of the display that may contain
* an application window, excluding the system decorations. The application display area may
* be smaller than the real display area because the system subtracts the space needed
- * for decor elements such as the status bar. Use {@link WindowMetrics#getSize()} to query the
- * application window size.</li>
+ * for decor elements such as the status bar. Use {@link WindowMetrics#getBounds()} to query the
+ * application window bounds.</li>
* <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
@@ -673,7 +673,7 @@ public final class Display {
*
* @param outSize A {@link Point} object to receive the size information.
* @deprecated Use {@link WindowManager#getCurrentWindowMetrics()} to obtain an instance of
- * {@link WindowMetrics} and use {@link WindowMetrics#getSize()} instead.
+ * {@link WindowMetrics} and use {@link WindowMetrics#getBounds()} instead.
*/
@Deprecated
public void getSize(Point outSize) {
@@ -689,7 +689,7 @@ public final class Display {
* Gets the size of the display as a rectangle, in pixels.
*
* @param outSize A {@link Rect} object to receive the size information.
- * @deprecated Use {@link WindowMetrics#getSize()} to get the dimensions of the application
+ * @deprecated Use {@link WindowMetrics#getBounds()} to get the dimensions of the application
* window area.
*/
@Deprecated
@@ -755,7 +755,7 @@ public final class Display {
}
/**
- * @deprecated Use {@link WindowMetrics#getSize()} instead.
+ * @deprecated Use {@link WindowMetrics#getBounds#width()} instead.
*/
@Deprecated
public int getWidth() {
@@ -766,7 +766,7 @@ public final class Display {
}
/**
- * @deprecated Use {@link WindowMetrics#getSize()} instead.
+ * @deprecated Use {@link WindowMetrics#getBounds()#height()} instead.
*/
@Deprecated
public int getHeight() {
@@ -1105,7 +1105,7 @@ public final class Display {
* </p>
*
* @param outMetrics A {@link DisplayMetrics} object to receive the metrics.
- * @deprecated Use {@link WindowMetrics#getSize()} to get the dimensions of the application
+ * @deprecated Use {@link WindowMetrics#getBounds()} to get the dimensions of the application
* window area, and {@link Configuration#densityDpi} to get the current density.
*/
@Deprecated