Loading core/java/android/content/res/Configuration.java +1 −1 Original line number Diff line number Diff line Loading @@ -806,7 +806,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration * * <aside class="note"><b>Note:</b> If the app targets * {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM} * or after, The width measurement reflects the window size without excluding insets. * or after, the width measurement reflects the window size without excluding insets. * Otherwise, the measurement excludes window insets even when the app is displayed edge to edge * using {@link android.view.Window#setDecorFitsSystemWindows(boolean) * Window#setDecorFitsSystemWindows(boolean)}.</aside> Loading core/java/android/view/Display.java +10 −3 Original line number Diff line number Diff line Loading @@ -916,6 +916,12 @@ public final class Display { * {@code getWindowManager()} or {@code getSystemService(Context.WINDOW_SERVICE)}), the * size of the current app window is returned. As a result, in multi-window mode, the * returned size can be smaller than the size of the device screen. * The returned window size can vary depending on API level: * <ul> * <li>API level 35 and above, the window size will be returned. * <li>API level 34 and below, the window size minus system decoration areas and * display cutout is returned. * </ul> * <li>If size is requested from a non-activity context (for example, the application * context, where the WindowManager is accessed by * {@code getApplicationContext().getSystemService(Context.WINDOW_SERVICE)}), the Loading @@ -924,9 +930,10 @@ public final class Display { * <li>API level 29 and below — The size of the entire display (based on * current rotation) minus system decoration areas is returned. * <li>API level 30 and above — The size of the top running activity in the * current process is returned. If the current process has no running * activities, the size of the device default display, including system * decoration areas, is returned. * current process is returned, system decoration areas exclusion follows the * behavior defined above, based on the caller's API level. If the current * process has no running activities, the size of the device default display, * including system decoration areas, is returned. * </ul> * </ul> * Loading core/java/android/view/WindowManager.java +5 −7 Original line number Diff line number Diff line Loading @@ -781,7 +781,7 @@ public interface WindowManager extends ViewManager { * <p> * The metrics describe the size of the area the window would occupy with * {@link LayoutParams#MATCH_PARENT MATCH_PARENT} width and height, and the {@link WindowInsets} * such a window would have. * such a window would have. The {@link WindowInsets} are not deducted from the bounds. * <p> * The value of this is based on the <b>current</b> windowing state of the system. * Loading Loading @@ -811,7 +811,7 @@ public interface WindowManager extends ViewManager { * <p> * The metrics describe the size of the largest potential area the window might occupy with * {@link LayoutParams#MATCH_PARENT MATCH_PARENT} width and height, and the {@link WindowInsets} * such a window would have. * such a window would have. The {@link WindowInsets} are not deducted from the bounds. * <p> * Note that this might still be smaller than the size of the physical display if certain areas * of the display are not available to windows created in this {@link Context}. Loading Loading @@ -4264,11 +4264,9 @@ public interface WindowManager extends ViewManager { * no letterbox is applied."/> * * <p> * A cutout in the corner is considered to be on the short edge: <br/> * <img src="{@docRoot}reference/android/images/display_cutout/short_edge/fullscreen_corner_no_letterbox.png" * height="720" * alt="Screenshot of a fullscreen activity on a display with a cutout in the corner in * portrait, no letterbox is applied."/> * A cutout in the corner can be considered to be on different edge in different device * rotations. This behavior may vary from device to device. Use this flag is possible to * letterbox your app if the display cutout is at corner. * * <p> * On the other hand, should the cutout be on the long edge of the display, a letterbox will Loading core/java/android/view/WindowMetrics.java +7 −3 Original line number Diff line number Diff line Loading @@ -101,9 +101,13 @@ public final class WindowMetrics { * Returns the bounds of the area associated with this window or {@code UiContext}. * <p> * <b>Note that the size of the reported bounds can have different size than * {@link Display#getSize(Point)}.</b> This method reports the window size including all system * bar areas, while {@link Display#getSize(Point)} reports the area excluding navigation bars * and display cutout areas. The value reported by {@link Display#getSize(Point)} can be * {@link Display#getSize(Point)} based on your target API level and calling context.</b> * This method reports the window size including all system * bar areas, while {@link Display#getSize(Point)} can report the area excluding navigation bars * and display cutout areas depending on the calling context and target SDK level. Please refer * to {@link Display#getSize(Point)} for details. * <p> * The value reported by {@link Display#getSize(Point)} excluding system decoration areas can be * obtained by using: * <pre class="prettyprint"> * final WindowMetrics metrics = windowManager.getCurrentWindowMetrics(); Loading core/res/res/values/attrs.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2589,6 +2589,8 @@ <li>The framework will set {@link android.R.attr#statusBarColor}, {@link android.R.attr#navigationBarColor}, and {@link android.R.attr#navigationBarDividerColor} to transparent. <li>The frameworks will send Configuration no longer considering system insets. The Configuration will be stable regardless of the system insets change. </ul> <p>If this is true, the edge-to-edge enforcement won't be applied. However, this Loading Loading
core/java/android/content/res/Configuration.java +1 −1 Original line number Diff line number Diff line Loading @@ -806,7 +806,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration * * <aside class="note"><b>Note:</b> If the app targets * {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM} * or after, The width measurement reflects the window size without excluding insets. * or after, the width measurement reflects the window size without excluding insets. * Otherwise, the measurement excludes window insets even when the app is displayed edge to edge * using {@link android.view.Window#setDecorFitsSystemWindows(boolean) * Window#setDecorFitsSystemWindows(boolean)}.</aside> Loading
core/java/android/view/Display.java +10 −3 Original line number Diff line number Diff line Loading @@ -916,6 +916,12 @@ public final class Display { * {@code getWindowManager()} or {@code getSystemService(Context.WINDOW_SERVICE)}), the * size of the current app window is returned. As a result, in multi-window mode, the * returned size can be smaller than the size of the device screen. * The returned window size can vary depending on API level: * <ul> * <li>API level 35 and above, the window size will be returned. * <li>API level 34 and below, the window size minus system decoration areas and * display cutout is returned. * </ul> * <li>If size is requested from a non-activity context (for example, the application * context, where the WindowManager is accessed by * {@code getApplicationContext().getSystemService(Context.WINDOW_SERVICE)}), the Loading @@ -924,9 +930,10 @@ public final class Display { * <li>API level 29 and below — The size of the entire display (based on * current rotation) minus system decoration areas is returned. * <li>API level 30 and above — The size of the top running activity in the * current process is returned. If the current process has no running * activities, the size of the device default display, including system * decoration areas, is returned. * current process is returned, system decoration areas exclusion follows the * behavior defined above, based on the caller's API level. If the current * process has no running activities, the size of the device default display, * including system decoration areas, is returned. * </ul> * </ul> * Loading
core/java/android/view/WindowManager.java +5 −7 Original line number Diff line number Diff line Loading @@ -781,7 +781,7 @@ public interface WindowManager extends ViewManager { * <p> * The metrics describe the size of the area the window would occupy with * {@link LayoutParams#MATCH_PARENT MATCH_PARENT} width and height, and the {@link WindowInsets} * such a window would have. * such a window would have. The {@link WindowInsets} are not deducted from the bounds. * <p> * The value of this is based on the <b>current</b> windowing state of the system. * Loading Loading @@ -811,7 +811,7 @@ public interface WindowManager extends ViewManager { * <p> * The metrics describe the size of the largest potential area the window might occupy with * {@link LayoutParams#MATCH_PARENT MATCH_PARENT} width and height, and the {@link WindowInsets} * such a window would have. * such a window would have. The {@link WindowInsets} are not deducted from the bounds. * <p> * Note that this might still be smaller than the size of the physical display if certain areas * of the display are not available to windows created in this {@link Context}. Loading Loading @@ -4264,11 +4264,9 @@ public interface WindowManager extends ViewManager { * no letterbox is applied."/> * * <p> * A cutout in the corner is considered to be on the short edge: <br/> * <img src="{@docRoot}reference/android/images/display_cutout/short_edge/fullscreen_corner_no_letterbox.png" * height="720" * alt="Screenshot of a fullscreen activity on a display with a cutout in the corner in * portrait, no letterbox is applied."/> * A cutout in the corner can be considered to be on different edge in different device * rotations. This behavior may vary from device to device. Use this flag is possible to * letterbox your app if the display cutout is at corner. * * <p> * On the other hand, should the cutout be on the long edge of the display, a letterbox will Loading
core/java/android/view/WindowMetrics.java +7 −3 Original line number Diff line number Diff line Loading @@ -101,9 +101,13 @@ public final class WindowMetrics { * Returns the bounds of the area associated with this window or {@code UiContext}. * <p> * <b>Note that the size of the reported bounds can have different size than * {@link Display#getSize(Point)}.</b> This method reports the window size including all system * bar areas, while {@link Display#getSize(Point)} reports the area excluding navigation bars * and display cutout areas. The value reported by {@link Display#getSize(Point)} can be * {@link Display#getSize(Point)} based on your target API level and calling context.</b> * This method reports the window size including all system * bar areas, while {@link Display#getSize(Point)} can report the area excluding navigation bars * and display cutout areas depending on the calling context and target SDK level. Please refer * to {@link Display#getSize(Point)} for details. * <p> * The value reported by {@link Display#getSize(Point)} excluding system decoration areas can be * obtained by using: * <pre class="prettyprint"> * final WindowMetrics metrics = windowManager.getCurrentWindowMetrics(); Loading
core/res/res/values/attrs.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2589,6 +2589,8 @@ <li>The framework will set {@link android.R.attr#statusBarColor}, {@link android.R.attr#navigationBarColor}, and {@link android.R.attr#navigationBarDividerColor} to transparent. <li>The frameworks will send Configuration no longer considering system insets. The Configuration will be stable regardless of the system insets change. </ul> <p>If this is true, the edge-to-edge enforcement won't be applied. However, this Loading