OSDN Git Service

OC-MR1 DisplayCutout XML API
authorAdrian Roos <roosa@google.com>
Tue, 20 Mar 2018 13:58:29 +0000 (14:58 +0100)
committerAdrian Roos <roosa@google.com>
Wed, 2 May 2018 10:52:42 +0000 (10:52 +0000)
Bug: 78122614
Test: m checkbuild
Change-Id: I974d3d4385ba66477e0932d40d0af7bcd32ddfb1
Merged-In: I226622533a1b406ba26c161cba13721080b4baca

api/current.txt
core/res/res/values/attrs.xml
core/res/res/values/public.xml

index 25e998c..5499d9e 100644 (file)
@@ -1525,6 +1525,7 @@ package android {
     field public static final int windowHideAnimation = 16842935; // 0x10100b7
     field public static final int windowIsFloating = 16842839; // 0x1010057
     field public static final int windowIsTranslucent = 16842840; // 0x1010058
+    field public static final int windowLayoutInDisplayCutoutMode = 16844166; // 0x1010586
     field public static final int windowLightNavigationBar = 16844140; // 0x101056c
     field public static final int windowLightStatusBar = 16844000; // 0x10104e0
     field public static final int windowMinWidthMajor = 16843606; // 0x1010356
index 0e879cd..35eb9cd 100644 (file)
              Corresponds to setting {@link android.view.View#SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR} on
              the decor view. -->
          <attr name="windowLightNavigationBar" format="boolean" />
+
+        <!-- Controls how the window is laid out if there is a {@code DisplayCutout}.
+        <p>
+        Defaults to {@code default}.
+        -->
+        <attr name="windowLayoutInDisplayCutoutMode">
+            <!-- <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.
+            -->
+            <enum name="default" value="0" />
+            <!-- <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
+            <code>DisplayCutout</code>.
+            -->
+            <enum name="shortEdges" value="1" />
+            <!-- <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</code> to avoid a relayout of the window when the
+            flag is set or cleared.
+            -->
+            <enum name="never" value="2" />
+        </attr>
     </declare-styleable>
 
     <!-- The set of attributes that describe a AlertDialog's theme. -->
index bbd29c5..10cec79 100644 (file)
     <public type="attr" name="classLoader" id="0x0101056b" />
     <public type="attr" name="windowLightNavigationBar" id="0x0101056c" />
     <public type="attr" name="navigationBarDividerColor" id="0x0101056d" />
+    <public type="attr" name="windowLayoutInDisplayCutoutMode" id="0x01010586" />
 
     <public type="string" name="autofill" id="0x0104001a"/>