Fix dark mode activity in incorrect stage exception

Bug: 192342363
Test: atest com.android.settings.display.darkmode.DarkThemeScheduleComponentTest
Change-Id: Iaa368cbd7c7d9d9b111965e38e5a6ec480db2663
This commit is contained in:
Syaoran Kuo
2021-06-29 21:18:32 +08:00
parent c7eab66630
commit 5f9e36181d

View File

@@ -88,8 +88,7 @@ public class DarkThemeScheduleComponentTest {
CommonUtils.reopenScreen();
});
// Recreate the scenario to make sure UI apply new mode.
scenario.recreate();
// Relaunch the scenario to make sure UI apply new mode.
scenario.onActivity(activity -> {
Log.d(TAG, "Activity Recreated!");
UiUtils.waitForActivitiesInStage(2000, Stage.RESUMED);