Remove TURN_ON_SCREEN from bulkUpdate and set mTurnOnScreen.
If TURN_ON_SCREEN is added to the bulkUpdate flags, there's a
possibility it can get cleared before it's actually used. Instead,
just set the mService.mTurnOnScreen flag directly so it only gets
cleared when it's used.
Test: Windows with turnOnScreen flag work correctly now.
Test: ActivityManagerActivityVisibilityTests.testTurnScreenOnActivity
Test: go/wm-smoke
Fixes: 71789344
Change-Id: I7aba2bb8c7c960216df79b59b11e6efb552ed2cb
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index 2a77c92..2cc96c9 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -86,7 +86,6 @@
import static com.android.server.wm.WindowManagerService.logSurface;
import static com.android.server.wm.WindowSurfacePlacer.SET_FORCE_HIDING_CHANGED;
import static com.android.server.wm.WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE;
-import static com.android.server.wm.WindowSurfacePlacer.SET_TURN_ON_SCREEN;
import static com.android.server.wm.WindowSurfacePlacer.SET_UPDATE_ROTATION;
import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_ACTION_PENDING;
import static com.android.server.wm.WindowSurfacePlacer.SET_WALLPAPER_MAY_CHANGE;
@@ -968,9 +967,7 @@
doRequest = true;
}
}
- if ((bulkUpdateParams & SET_TURN_ON_SCREEN) != 0) {
- mService.mTurnOnScreen = true;
- }
+
if ((bulkUpdateParams & SET_WALLPAPER_ACTION_PENDING) != 0) {
mWallpaperActionPending = true;
}