From 9eedb6ab862bf6fac27f1f5927ba3a0755f9d699 Mon Sep 17 00:00:00 2001
From: Gray Mackall <34871572+gmackall@users.noreply.github.com>
Date: Mon, 11 Mar 2024 16:04:55 -0700
Subject: [PATCH] Make scenario app have translucent splash screen so it
doesn't affect screenshot colors (flutter/engine#51329)
Makes the scenario app splash screen have a translucent color, so it doesn't end up overlaying on screenshots.
Before:
[device-2024-03-07-152047.webm](https://github.com/flutter/flutter/assets/34871572/a9b7a1f9-57ab-4eda-93e5-5ca70032cbef)
After:
[translucentsplash.webm](https://github.com/flutter/engine/assets/34871572/a6eb6407-add0-4004-83f9-4e0a5c1bb6f6)
This sort of fixes https://github.com/flutter/flutter/issues/144657? The issue is still odd to me, though, because I don't know why the test runner wouldn't be waiting properly for the splash screen.
Bonus, this is what it looks like if we [change the runner](https://github.com/flutter/engine/blob/a70a0abdec8ca3f022f9f5072c5f743032285e92/testing/scenario_app/bin/run_android_tests.dart#L352) to not use animations, with `--no-window-animation` (but don't include the splash screen change):
[no_animation_example.webm](https://github.com/flutter/engine/assets/34871572/0c8665a3-b546-4bbd-b7e1-00851c48e1ff)
You can see there is still a moment of color change at the end of tests (ignore the very first test I was alt tabbing and lagged out my emulator).
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
---
.../scenario_app/android/app/src/main/res/values/styles.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/engine/src/flutter/testing/scenario_app/android/app/src/main/res/values/styles.xml b/engine/src/flutter/testing/scenario_app/android/app/src/main/res/values/styles.xml
index 5885930df6..af4477a1bc 100644
--- a/engine/src/flutter/testing/scenario_app/android/app/src/main/res/values/styles.xml
+++ b/engine/src/flutter/testing/scenario_app/android/app/src/main/res/values/styles.xml
@@ -6,6 +6,7 @@
- @color/colorPrimary
- @color/colorPrimaryDark
- @color/colorAccent
+ - true