Merge "Updated API documentation of screenWidthDp and screenHeightDp to include multiple-screen behavior." into tm-dev am: ea8489c0ce am: d0e3b4d155

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17836588

Change-Id: I3c190879dd9ca0e7b183bdcde32bda1a48f124bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jon Eckenrode
2022-04-20 23:06:17 +00:00
committed by Automerger Merge Worker

View File

@@ -763,6 +763,14 @@ public final class Configuration implements Parcelable, Comparable<Configuration
* (for example, when apps are displayed side by side in split-screen mode
* in landscape orientation).
*
* <p>In multiple-screen scenarios, the width measurement can span screens.
* For example, if the app is spanning both screens of a dual-screen device
* (with the screens side by side), {@code screenWidthDp} represents the
* width of both screens, excluding the area occupied by screen decorations.
* When the app is restricted to a single screen in a multiple-screen
* environment, {@code screenWidthDp} is the width of the screen on which
* the app is running.
*
* <p>Differs from {@link android.view.WindowMetrics} by not including
* screen decorations in the width measurement and by expressing the
* measurement in dp rather than px. Use {@code screenWidthDp} to obtain the
@@ -792,6 +800,14 @@ public final class Configuration implements Parcelable, Comparable<Configuration
* (for example, when apps are displayed one above another in split-screen
* mode in portrait orientation).
*
* <p>In multiple-screen scenarios, the height measurement can span screens.
* For example, if the app is spanning both screens of a dual-screen device
* rotated 90 degrees (one screen above the other), {@code screenHeightDp}
* represents the height of both screens, excluding the area occupied by
* screen decorations. When the app is restricted to a single screen in a
* multiple-screen environment, {@code screenHeightDp} is the height of the
* screen on which the app is running.
*
* <p>Differs from {@link android.view.WindowMetrics} by not including
* screen decorations in the height measurement and by expressing the
* measurement in dp rather than px. Use {@code screenHeightDp} to obtain