diff options
author | Adrian Roos <roosa@google.com> | 2018-03-28 14:54:06 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-03-28 14:54:06 +0000 |
commit | 1a2ee998b7eed03fccf06e74e04e02a901609ba1 (patch) | |
tree | 77e1f238a36e92ab9a2f453179ab56ecab4aa2fc | |
parent | 3c510bbdfb0866cf072065aa4bcf7f6a7ca683d9 (diff) | |
parent | f71a29c976345d907fe6a07e9347dce38444b239 (diff) |
Merge "DisplayCutout: Fix attrs.xml javadoc" into pi-dev am: 813a4bee76
am: f71a29c976
Change-Id: I9cc8503daa68cbc45f288bf61afa54d3ad4045f2
-rw-r--r-- | core/java/android/view/WindowManager.java | 31 | ||||
-rw-r--r-- | core/res/res/values/attrs.xml | 62 |
2 files changed, 53 insertions, 40 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index abc19d0e5c7a..8c568bc9c9a5 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -2220,7 +2220,7 @@ public interface WindowManager extends ViewManager { @IntDef( flag = true, value = {LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT, - LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS, + LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES, LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER}) @interface LayoutInDisplayCutoutMode {} @@ -2231,10 +2231,11 @@ public interface WindowManager extends ViewManager { * Defaults to {@link #LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT}. * * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT - * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS + * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES * @see #LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER * @see DisplayCutout - * @see android.R.attr#layoutInDisplayCutoutMode + * @see android.R.attr#windowLayoutInDisplayCutoutMode + * android:windowLayoutInDisplayCutoutMode */ @LayoutInDisplayCutoutMode public int layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT; @@ -2245,10 +2246,10 @@ public interface WindowManager extends ViewManager { * laid out such that it does not overlap with the {@link DisplayCutout} area. * * <p> - * In practice, this means that if the window did not set FLAG_FULLSCREEN or - * SYSTEM_UI_FLAG_FULLSCREEN, it can extend into the cutout area in portrait if the cutout - * is at the top edge. Similarly for SYSTEM_UI_FLAG_HIDE_NAVIGATION and a cutout at the - * bottom of the screen. + * In practice, this means that if the window did not set {@link #FLAG_FULLSCREEN} or + * {@link View#SYSTEM_UI_FLAG_FULLSCREEN}, it can extend into the cutout area in portrait + * if the cutout is at the top edge. Similarly for + * {@link View#SYSTEM_UI_FLAG_HIDE_NAVIGATION} and a cutout at the bottom of the screen. * Otherwise (i.e. fullscreen or landscape) it is laid out such that it does not overlap the * cutout area. * @@ -2258,6 +2259,9 @@ public interface WindowManager extends ViewManager { * * @see DisplayCutout * @see WindowInsets + * @see #layoutInDisplayCutoutMode + * @see android.R.attr#windowLayoutInDisplayCutoutMode + * android:windowLayoutInDisplayCutoutMode */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT = 0; @@ -2281,6 +2285,9 @@ public interface WindowManager extends ViewManager { * * @see DisplayCutout * @see WindowInsets#getDisplayCutout() + * @see #layoutInDisplayCutoutMode + * @see android.R.attr#windowLayoutInDisplayCutoutMode + * android:windowLayoutInDisplayCutoutMode */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES = 1; @@ -2288,12 +2295,14 @@ public interface WindowManager extends ViewManager { * The window is never allowed to overlap with the DisplayCutout area. * * <p> - * This should be used with windows that transiently set SYSTEM_UI_FLAG_FULLSCREEN to - * avoid a relayout of the window when the flag is set or cleared. + * This should be used with windows that transiently set + * {@link View#SYSTEM_UI_FLAG_FULLSCREEN} or {@link View#SYSTEM_UI_FLAG_HIDE_NAVIGATION} + * to avoid a relayout of the window when the respective flag is set or cleared. * * @see DisplayCutout - * @see View#SYSTEM_UI_FLAG_FULLSCREEN SYSTEM_UI_FLAG_FULLSCREEN - * @see View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + * @see #layoutInDisplayCutoutMode + * @see android.R.attr#windowLayoutInDisplayCutoutMode + * android:windowLayoutInDisplayCutoutMode */ public static final int LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER = 2; diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 313545592bbd..aceba0879368 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -2123,44 +2123,48 @@ <!-- Controls how the window is laid out if there is a {@code DisplayCutout}. <p> Defaults to {@code default}. - - @see android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT - @see android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES - @see android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER - @see android.view.DisplayCutout - @see android.R.attr#layoutInDisplayCutoutMode --> + <p> + See also + {@link android.view.WindowManager.LayoutParams#layoutInDisplayCutoutMode + WindowManager.LayoutParams.layoutInDisplayCutoutMode}, + {@link android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT}, + {@link android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES}, + {@link android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER}, + and {@link android.view.DisplayCutout DisplayCutout} + --> <attr name="windowLayoutInDisplayCutoutMode"> - <!-- The window is allowed to extend into the {@code DisplayCutout} area, only if the - {@code DisplayCutout} is fully contained within a system bar. Otherwise, the window is - laid out such that it does not overlap with the {@code DisplayCutout} area. - - @see android.view.DisplayCutout - @see android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT + <!-- <p> + The window is allowed to extend into the <code>DisplayCutout</code> area, only if + the <code>DisplayCutout</code> is fully contained within a system bar. Otherwise, the + window is laid out such that it does not overlap with the <code>DisplayCutout</code> + area. + <p> + Corresponds to <code>LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT</code>. --> <enum name="default" value="0" /> - <!-- - The window is always allowed to extend into the {@code DisplayCutout} areas on the short - edges of the screen even if fullscreen or in landscape. - The window will never extend into a {@link DisplayCutout} area on the long edges of the - screen. + <!-- <p> + The window is always allowed to extend into the <code>DisplayCutout</code> areas on the + short edges of the screen even if fullscreen or in landscape. + The window will never extend into a <code>DisplayCutout</code> area on the long edges of + the screen. <p> The window must make sure that no important content overlaps with the - {@link DisplayCutout}. - - @see android.view.DisplayCutout - @see android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES + <code>DisplayCutout</code>. + <p> + Corresponds to <code>LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES</code>. --> <enum name="shortEdges" value="1" /> - <!-- Use {@code shortEdges} instead. This is temporarily here to unblock pushing the SDK - until all usages have been migrated to {@code shortEdges} --> + <!-- Use <code>shortEdges</code> instead. This is temporarily here to unblock pushing + the SDK until all usages have been migrated to <code>shortEdges</code> --> <enum name="always" value="1" /> - <!-- The window is never allowed to overlap with the DisplayCutout area. + <!-- <p> + The window is never allowed to overlap with the <code>DisplayCutout</code> area. <p> - This should be used with windows that transiently set {@code SYSTEM_UI_FLAG_FULLSCREEN} - to avoid a relayout of the window when the flag is set or cleared. - - @see android.view.DisplayCutout - @see android.view.WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER + This should be used with windows that transiently set + <code>SYSTEM_UI_FLAG_FULLSCREEN</code> to avoid a relayout of the window when the + flag is set or cleared. + <p> + Corresponds to <code>LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER</code>. --> <enum name="never" value="2" /> </attr> |