Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -53871,6 +53871,7 @@ package android.view { field public static final int LAST_SUB_WINDOW = 1999; // 0x7cf field public static final int LAST_SYSTEM_WINDOW = 2999; // 0xbb7 field public static final int LAYOUT_CHANGED = 1; // 0x1 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 3; // 0x3 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT = 0; // 0x0 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER = 2; // 0x2 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES = 1; // 0x1 core/java/android/view/WindowManager.java +22 −8 Original line number Diff line number Diff line Loading @@ -2402,7 +2402,8 @@ public interface WindowManager extends ViewManager { flag = true, value = {LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT, LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES, LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER}) LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER, LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS}) @interface LayoutInDisplayCutoutMode {} /** Loading @@ -2414,6 +2415,7 @@ public interface WindowManager extends ViewManager { * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS * @see DisplayCutout * @see android.R.attr#windowLayoutInDisplayCutoutMode * android:windowLayoutInDisplayCutoutMode Loading Loading @@ -2446,13 +2448,6 @@ public interface WindowManager extends ViewManager { */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT = 0; /** * @deprecated use {@link #LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES} * @hide */ @Deprecated public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 1; /** * The window is always allowed to extend into the {@link DisplayCutout} areas on the short * edges of the screen. Loading Loading @@ -2516,6 +2511,25 @@ public interface WindowManager extends ViewManager { */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER = 2; /** * The window is always allowed to extend into the {@link DisplayCutout} areas on the all * edges of the screen. * * <p> * The window must make sure that no important content overlaps with the * {@link DisplayCutout}. * * <p> * In this mode, the window extends under cutouts on the all edges of the display in both * portrait and landscape, regardless of whether the window is hiding the system bars. * * @see DisplayCutout * @see WindowInsets#getDisplayCutout() * @see #layoutInDisplayCutoutMode * @see android.R.attr#windowLayoutInDisplayCutoutMode * android:windowLayoutInDisplayCutoutMode */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 3; /** * When this window has focus, disable touch pad pointer gesture processing. Loading core/java/com/android/internal/policy/PhoneWindow.java +2 −2 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH; import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION; import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS; import android.annotation.NonNull; Loading Loading @@ -2466,7 +2466,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (a.hasValue(R.styleable.Window_windowLayoutInDisplayCutoutMode)) { int mode = a.getInt(R.styleable.Window_windowLayoutInDisplayCutoutMode, -1); if (mode < LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT || mode > LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER) { || mode > LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) { throw new UnsupportedOperationException("Unknown windowLayoutInDisplayCutoutMode: " + a.getString(R.styleable.Window_windowLayoutInDisplayCutoutMode)); } Loading core/res/res/values/attrs.xml +10 −0 Original line number Diff line number Diff line Loading @@ -2217,6 +2217,16 @@ Corresponds to <code>LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER</code>. --> <enum name="never" value="2" /> <!-- <p> The window is always allowed to extend into the <code>DisplayCutout</code> areas on the all edges of the screen. <p> The window must make sure that no important content overlaps with the <code>DisplayCutout</code>. <p> Corresponds to <code>LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS</code>. --> <enum name="always" value="3" /> </attr> </declare-styleable> Loading core/tests/coretests/res/values/styles.xml +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ <style name="LayoutInDisplayCutoutModeNever"> <item name="android:windowLayoutInDisplayCutoutMode">never</item> </style> <style name="LayoutInDisplayCutoutModeAlways"> <item name="android:windowLayoutInDisplayCutoutMode">always</item> </style> <style name="WindowBackgroundColorLiteral"> <item name="android:windowBackground">#00FF00</item> </style> Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -53871,6 +53871,7 @@ package android.view { field public static final int LAST_SUB_WINDOW = 1999; // 0x7cf field public static final int LAST_SYSTEM_WINDOW = 2999; // 0xbb7 field public static final int LAYOUT_CHANGED = 1; // 0x1 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 3; // 0x3 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT = 0; // 0x0 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER = 2; // 0x2 field public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES = 1; // 0x1
core/java/android/view/WindowManager.java +22 −8 Original line number Diff line number Diff line Loading @@ -2402,7 +2402,8 @@ public interface WindowManager extends ViewManager { flag = true, value = {LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT, LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES, LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER}) LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER, LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS}) @interface LayoutInDisplayCutoutMode {} /** Loading @@ -2414,6 +2415,7 @@ public interface WindowManager extends ViewManager { * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS * @see DisplayCutout * @see android.R.attr#windowLayoutInDisplayCutoutMode * android:windowLayoutInDisplayCutoutMode Loading Loading @@ -2446,13 +2448,6 @@ public interface WindowManager extends ViewManager { */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT = 0; /** * @deprecated use {@link #LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES} * @hide */ @Deprecated public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 1; /** * The window is always allowed to extend into the {@link DisplayCutout} areas on the short * edges of the screen. Loading Loading @@ -2516,6 +2511,25 @@ public interface WindowManager extends ViewManager { */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER = 2; /** * The window is always allowed to extend into the {@link DisplayCutout} areas on the all * edges of the screen. * * <p> * The window must make sure that no important content overlaps with the * {@link DisplayCutout}. * * <p> * In this mode, the window extends under cutouts on the all edges of the display in both * portrait and landscape, regardless of whether the window is hiding the system bars. * * @see DisplayCutout * @see WindowInsets#getDisplayCutout() * @see #layoutInDisplayCutoutMode * @see android.R.attr#windowLayoutInDisplayCutoutMode * android:windowLayoutInDisplayCutoutMode */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS = 3; /** * When this window has focus, disable touch pad pointer gesture processing. Loading
core/java/com/android/internal/policy/PhoneWindow.java +2 −2 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH; import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION; import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS; import android.annotation.NonNull; Loading Loading @@ -2466,7 +2466,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (a.hasValue(R.styleable.Window_windowLayoutInDisplayCutoutMode)) { int mode = a.getInt(R.styleable.Window_windowLayoutInDisplayCutoutMode, -1); if (mode < LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT || mode > LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER) { || mode > LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) { throw new UnsupportedOperationException("Unknown windowLayoutInDisplayCutoutMode: " + a.getString(R.styleable.Window_windowLayoutInDisplayCutoutMode)); } Loading
core/res/res/values/attrs.xml +10 −0 Original line number Diff line number Diff line Loading @@ -2217,6 +2217,16 @@ Corresponds to <code>LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER</code>. --> <enum name="never" value="2" /> <!-- <p> The window is always allowed to extend into the <code>DisplayCutout</code> areas on the all edges of the screen. <p> The window must make sure that no important content overlaps with the <code>DisplayCutout</code>. <p> Corresponds to <code>LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS</code>. --> <enum name="always" value="3" /> </attr> </declare-styleable> Loading
core/tests/coretests/res/values/styles.xml +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ <style name="LayoutInDisplayCutoutModeNever"> <item name="android:windowLayoutInDisplayCutoutMode">never</item> </style> <style name="LayoutInDisplayCutoutModeAlways"> <item name="android:windowLayoutInDisplayCutoutMode">always</item> </style> <style name="WindowBackgroundColorLiteral"> <item name="android:windowBackground">#00FF00</item> </style> Loading