Set cutout mode to shortEdges on flicker

Use short edges on the flicker tests so that the test apps cover the full screen in both raven and in flame devices. With default cutout, some assertions will need to be updated to consider the letterbox layers, as well as app windows not covering the entire display

Bug: 209935473
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Iaeabe2033adc2890605bbef7bce139569f402c4b
This commit is contained in:
Nataniel Borges
2022-01-07 16:12:13 +01:00
parent 9ebd54d157
commit dd1d5b61b1
4 changed files with 76 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:launchMode="singleTop"
android:theme="@style/CutoutShortEdges"
android:label="FixedApp"
android:exported="true">
<intent-filter>
@@ -37,6 +38,7 @@
android:supportsPictureInPicture="true"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:taskAffinity="com.android.wm.shell.flicker.testapp.PipActivity"
android:theme="@style/CutoutShortEdges"
android:launchMode="singleTop"
android:label="PipApp"
android:exported="true">
@@ -52,6 +54,7 @@
<activity android:name=".ImeActivity"
android:taskAffinity="com.android.wm.shell.flicker.testapp.ImeActivity"
android:theme="@style/CutoutShortEdges"
android:label="ImeApp"
android:launchMode="singleTop"
android:exported="true">
@@ -68,6 +71,7 @@
<activity android:name=".SplitScreenActivity"
android:resizeableActivity="true"
android:taskAffinity="com.android.wm.shell.flicker.testapp.SplitScreenActivity"
android:theme="@style/CutoutShortEdges"
android:label="SplitScreenPrimaryApp"
android:exported="true">
<intent-filter>
@@ -79,6 +83,7 @@
<activity android:name=".SplitScreenSecondaryActivity"
android:resizeableActivity="true"
android:taskAffinity="com.android.wm.shell.flicker.testapp.SplitScreenSecondaryActivity"
android:theme="@style/CutoutShortEdges"
android:label="SplitScreenSecondaryApp"
android:exported="true">
<intent-filter>
@@ -90,6 +95,7 @@
<activity android:name=".NonResizeableActivity"
android:resizeableActivity="false"
android:taskAffinity="com.android.wm.shell.flicker.testapp.NonResizeableActivity"
android:theme="@style/CutoutShortEdges"
android:label="NonResizeableApp"
android:exported="true">
<intent-filter>
@@ -100,6 +106,7 @@
<activity android:name=".SimpleActivity"
android:taskAffinity="com.android.wm.shell.flicker.testapp.SimpleActivity"
android:theme="@style/CutoutShortEdges"
android:label="SimpleApp"
android:exported="true">
<intent-filter>
@@ -111,6 +118,7 @@
android:name=".LaunchBubbleActivity"
android:label="LaunchBubbleApp"
android:exported="true"
android:theme="@style/CutoutShortEdges"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -121,6 +129,7 @@
android:name=".BubbleActivity"
android:label="BubbleApp"
android:exported="false"
android:theme="@style/CutoutShortEdges"
android:resizeableActivity="true" />
</application>
</manifest>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="CutoutDefault">
<item name="android:windowLayoutInDisplayCutoutMode">default</item>
</style>
<style name="CutoutShortEdges">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<style name="CutoutNever">
<item name="android:windowLayoutInDisplayCutoutMode">never</item>
</style>
</resources>

View File

@@ -23,6 +23,7 @@
android:supportsRtl="true">
<activity android:name=".SimpleActivity"
android:taskAffinity="com.android.server.wm.flicker.testapp.SimpleActivity"
android:theme="@style/CutoutShortEdges"
android:label="SimpleApp"
android:exported="true">
<intent-filter>
@@ -32,6 +33,7 @@
</activity>
<activity android:name=".ImeActivity"
android:taskAffinity="com.android.server.wm.flicker.testapp.ImeActivity"
android:theme="@style/CutoutShortEdges"
android:label="ImeApp"
android:exported="true">
<intent-filter>
@@ -40,6 +42,7 @@
</intent-filter>
</activity>
<activity android:name=".ImeActivityAutoFocus"
android:theme="@style/CutoutShortEdges"
android:taskAffinity="com.android.server.wm.flicker.testapp.ImeActivityAutoFocus"
android:windowSoftInputMode="stateVisible"
android:label="ImeAppAutoFocus"
@@ -51,6 +54,7 @@
</activity>
<activity android:name=".SeamlessRotationActivity"
android:taskAffinity="com.android.server.wm.flicker.testapp.SeamlessRotationActivity"
android:theme="@style/CutoutShortEdges"
android:configChanges="orientation|screenSize"
android:label="SeamlessApp"
android:exported="true">
@@ -60,6 +64,7 @@
</intent-filter>
</activity>
<activity android:name=".NonResizeableActivity"
android:theme="@style/CutoutShortEdges"
android:resizeableActivity="false"
android:taskAffinity="com.android.server.wm.flicker.testapp.NonResizeableActivity"
android:label="NonResizeableApp"
@@ -72,6 +77,7 @@
</activity>
<activity android:name=".ButtonActivity"
android:taskAffinity="com.android.server.wm.flicker.testapp.ButtonActivity"
android:theme="@style/CutoutShortEdges"
android:configChanges="orientation|screenSize"
android:label="ButtonActivity"
android:exported="true">
@@ -82,6 +88,7 @@
</activity>
<activity android:name=".LaunchNewTaskActivity"
android:taskAffinity="com.android.server.wm.flicker.testapp.LaunchNewTaskActivity"
android:theme="@style/CutoutShortEdges"
android:configChanges="orientation|screenSize"
android:label="LaunchNewTaskActivity"
android:exported="true">

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="CutoutDefault">
<item name="android:windowLayoutInDisplayCutoutMode">default</item>
</style>
<style name="CutoutShortEdges">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<style name="CutoutNever">
<item name="android:windowLayoutInDisplayCutoutMode">never</item>
</style>
</resources>