Add default theme for flicker test app

Otherwise its WidowManager.LayoutParams#windowAnimations is 0, then
it won't play animation (TransitionAnimation#loadAnimationAttr
returns null) so the the surface of closing app may be updated to
invisible at random timing that causes the test flaky.

Use darker gray as window background color to make it easier to
distinguish the visual result between home, starting window (gray)
and app content (orange).

Bug: 216297992
Bug: 213852103
Test: com.android.server.wm.flicker.launch.OpenAppColdTest
Change-Id: I3bb073dfa52484a63168b3aeb6e7f5f43bd02aac
This commit is contained in:
Riddle Hsu
2022-02-08 22:54:11 +08:00
parent c271def030
commit 5a68f5cd91
2 changed files with 14 additions and 6 deletions

View File

@@ -16,15 +16,19 @@
-->
<resources>
<style name="CutoutDefault">
<style name="DefaultTheme" parent="@android:style/Theme.DeviceDefault">
<item name="android:windowBackground">@android:color/darker_gray</item>
</style>
<style name="CutoutDefault" parent="@style/DefaultTheme">
<item name="android:windowLayoutInDisplayCutoutMode">default</item>
</style>
<style name="CutoutShortEdges">
<style name="CutoutShortEdges" parent="@style/DefaultTheme">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<style name="CutoutNever">
<style name="CutoutNever" parent="@style/DefaultTheme">
<item name="android:windowLayoutInDisplayCutoutMode">never</item>
</style>
</resources>

View File

@@ -16,15 +16,19 @@
-->
<resources>
<style name="CutoutDefault">
<style name="DefaultTheme" parent="@android:style/Theme.DeviceDefault">
<item name="android:windowBackground">@android:color/darker_gray</item>
</style>
<style name="CutoutDefault" parent="@style/DefaultTheme">
<item name="android:windowLayoutInDisplayCutoutMode">default</item>
</style>
<style name="CutoutShortEdges">
<style name="CutoutShortEdges" parent="@style/DefaultTheme">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<style name="CutoutNever">
<style name="CutoutNever" parent="@style/DefaultTheme">
<item name="android:windowLayoutInDisplayCutoutMode">never</item>
</style>