Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be066e8b authored by Jon Eckenrode's avatar Jon Eckenrode Committed by Automerger Merge Worker
Browse files

Merge "Revised the API documentation for screenWidthDp and screenHeightDp to...

Merge "Revised the API documentation for screenWidthDp and screenHeightDp to include information about window insets and embedded activities." into tm-dev am: f7ed36ba am: 6174850f

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



Change-Id: Iab31cdb5792b6b7f04531404a1834b7fc5d641ce
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 3bf19045 6174850f
Loading
Loading
Loading
Loading
+51 −31
Original line number Original line Diff line number Diff line
@@ -751,9 +751,15 @@ public final class Configuration implements Parcelable, Comparable<Configuration
    public static final int SCREEN_WIDTH_DP_UNDEFINED = 0;
    public static final int SCREEN_WIDTH_DP_UNDEFINED = 0;


    /**
    /**
     * The current width of the available screen space in dp units, excluding
     * The width of the available screen space in dp units excluding the area
     * the area occupied by screen decorations at the edges of the display.
     * occupied by {@link android.view.WindowInsets window insets}.
     * Corresponds to the
     *
     * <aside class="note"><b>Note:</b> The width measurement excludes window
     * insets even when the app is displayed edge to edge using
     * {@link android.view.Window#setDecorFitsSystemWindows(boolean)
     * Window#setDecorFitsSystemWindows(boolean)}.</aside>
     *
     * <p>Corresponds to the
     * <a href="{@docRoot}guide/topics/resources/providing-resources.html#AvailableWidthHeightQualifier">
     * <a href="{@docRoot}guide/topics/resources/providing-resources.html#AvailableWidthHeightQualifier">
     * available width</a> resource qualifier. Defaults to
     * available width</a> resource qualifier. Defaults to
     * {@link #SCREEN_WIDTH_DP_UNDEFINED} if no width is specified.
     * {@link #SCREEN_WIDTH_DP_UNDEFINED} if no width is specified.
@@ -763,21 +769,25 @@ public final class Configuration implements Parcelable, Comparable<Configuration
     * (for example, when apps are displayed side by side in split-screen mode
     * (for example, when apps are displayed side by side in split-screen mode
     * in landscape orientation).
     * in landscape orientation).
     *
     *
     * <p>For embedded activities, equals the width of the individual
     * activities, not the width of the app window or the device screen.
     *
     * <p>In multiple-screen scenarios, the width measurement can span screens.
     * <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
     * For example, if the app is spanning both screens of a dual-screen device
     * (with the screens side by side), {@code screenWidthDp} represents the
     * (with the screens side by side), {@code screenWidthDp} represents the
     * width of both screens, excluding the area occupied by screen decorations.
     * width of both screens excluding the area occupied by window insets. When
     * When the app is restricted to a single screen in a multiple-screen
     * the app is restricted to a single screen in a multiple-screen
     * environment, {@code screenWidthDp} is the width of the screen on which
     * environment, {@code screenWidthDp} is the width of the screen on which
     * the app is running.
     * the app is displayed excluding window insets.
     *
     *
     * <p>Differs from {@link android.view.WindowMetrics} by not including
     * <p>Differs from {@link android.view.WindowMetrics} by not including
     * screen decorations in the width measurement and by expressing the
     * window insets in the width measurement and by expressing the measurement
     * measurement in dp rather than px. Use {@code screenWidthDp} to obtain the
     * in dp rather than px. Use {@code screenWidthDp} to obtain the width of
     * horizontal display area available to the app, excluding the area occupied
     * the display area available to an app or embedded activity excluding the
     * by screen decorations. Use {@link android.view.WindowMetrics#getBounds()}
     * area occupied by window insets. Use
     * to obtain the width of the display area available to the app, including
     * {@link android.view.WindowMetrics#getBounds()} to obtain the horizontal
     * the area occupied by screen decorations.
     * display area available to an app or embedded activity including the area
     * occupied by window insets.
     */
     */
    public int screenWidthDp;
    public int screenWidthDp;


@@ -788,9 +798,16 @@ public final class Configuration implements Parcelable, Comparable<Configuration
    public static final int SCREEN_HEIGHT_DP_UNDEFINED = 0;
    public static final int SCREEN_HEIGHT_DP_UNDEFINED = 0;


    /**
    /**
     * The current height of the available screen space in dp units, excluding
     * The height of the available screen space in dp units excluding the area
     * the area occupied by screen decorations at the edges of the display (such
     * occupied by {@link android.view.WindowInsets window insets}, such as the
     * as the status bar, navigation bar, and cutouts). Corresponds to the
     * status bar, navigation bar, and cutouts.
     *
     * <aside class="note"><b>Note:</b> The height measurement excludes window
     * insets even when the app is displayed edge to edge using
     * {@link android.view.Window#setDecorFitsSystemWindows(boolean)
     * Window#setDecorFitsSystemWindows(boolean)}.</aside>
     *
     * <p>Corresponds to the
     * <a href="{@docRoot}guide/topics/resources/providing-resources.html#AvailableWidthHeightQualifier">
     * <a href="{@docRoot}guide/topics/resources/providing-resources.html#AvailableWidthHeightQualifier">
     * available height</a> resource qualifier. Defaults to
     * available height</a> resource qualifier. Defaults to
     * {@link #SCREEN_HEIGHT_DP_UNDEFINED} if no height is specified.
     * {@link #SCREEN_HEIGHT_DP_UNDEFINED} if no height is specified.
@@ -800,22 +817,25 @@ public final class Configuration implements Parcelable, Comparable<Configuration
     * (for example, when apps are displayed one above another in split-screen
     * (for example, when apps are displayed one above another in split-screen
     * mode in portrait orientation).
     * mode in portrait orientation).
     *
     *
     * <p>For embedded activities, equals the height of the individual
     * activities, not the height of the app window or the device screen.
     *
     * <p>In multiple-screen scenarios, the height measurement can span screens.
     * <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
     * For example, if the app is spanning both screens of a dual-screen device
     * rotated 90 degrees (one screen above the other), {@code screenHeightDp}
     * rotated 90 degrees (one screen above the other), {@code screenHeightDp}
     * represents the height of both screens, excluding the area occupied by
     * represents the height of both screens excluding the area occupied by
     * screen decorations. When the app is restricted to a single screen in a
     * window insets. When the app is restricted to a single screen in a
     * multiple-screen environment, {@code screenHeightDp} is the height of the
     * multiple-screen environment, {@code screenHeightDp} is the height of the
     * screen on which the app is running.
     * screen on which the app is displayed excluding window insets.
     *
     *
     * <p>Differs from {@link android.view.WindowMetrics} by not including
     * <p>Differs from {@link android.view.WindowMetrics} by not including
     * screen decorations in the height measurement and by expressing the
     * window insets in the height measurement and by expressing the measurement
     * measurement in dp rather than px. Use {@code screenHeightDp} to obtain
     * in dp rather than px. Use {@code screenHeightDp} to obtain the height of
     * the vertical display area available to the app, excluding the area
     * the display area available to an app or embedded activity excluding the
     * occupied by screen decorations. Use
     * area occupied by window insets. Use
     * {@link android.view.WindowMetrics#getBounds()} to obtain the height of
     * {@link android.view.WindowMetrics#getBounds()} to obtain the vertical
     * the display area available to the app, including the area occupied by
     * display area available to an app or embedded activity including the area
     * screen decorations.
     * occupied by window insets.
     */
     */
    public int screenHeightDp;
    public int screenHeightDp;


@@ -826,12 +846,12 @@ public final class Configuration implements Parcelable, Comparable<Configuration
    public static final int SMALLEST_SCREEN_WIDTH_DP_UNDEFINED = 0;
    public static final int SMALLEST_SCREEN_WIDTH_DP_UNDEFINED = 0;


    /**
    /**
     * The smallest screen size an application will see in normal operation,
     * The smallest screen size an application will see in normal operation.
     * corresponding to
     * Corresponds to the
     * <a href="{@docRoot}guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">smallest
     * <a href="{@docRoot}guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">
     * screen width</a> resource qualifier.
     * smallest width</a> resource qualifier. This is the smallest value of
     * This is the smallest value of both screenWidthDp and screenHeightDp
     * {@link #screenWidthDp} and {@link #screenHeightDp} in both portrait and
     * in both portrait and landscape.  Set to
     * landscape orientations. Defaults to
     * {@link #SMALLEST_SCREEN_WIDTH_DP_UNDEFINED} if no width is specified.
     * {@link #SMALLEST_SCREEN_WIDTH_DP_UNDEFINED} if no width is specified.
     */
     */
    public int smallestScreenWidthDp;
    public int smallestScreenWidthDp;