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
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;
doRequest = true;
}
}
- if ((bulkUpdateParams & SET_TURN_ON_SCREEN) != 0) {
- mService.mTurnOnScreen = true;
- }
+
if ((bulkUpdateParams & SET_WALLPAPER_ACTION_PENDING) != 0) {
mWallpaperActionPending = true;
}
if ((bulkUpdateParams & WindowSurfacePlacer.SET_ORIENTATION_CHANGE_COMPLETE) != 0) {
builder.append(" ORIENTATION_CHANGE_COMPLETE");
}
- if ((bulkUpdateParams & WindowSurfacePlacer.SET_TURN_ON_SCREEN) != 0) {
- builder.append(" TURN_ON_SCREEN");
- }
return builder.toString();
}
import static com.android.server.wm.WindowManagerService.TYPE_LAYER_MULTIPLIER;
import static com.android.server.wm.WindowManagerService.logWithStack;
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.proto.WindowStateAnimatorProto.DRAW_STATE;
import static com.android.server.wm.proto.WindowStateAnimatorProto.LAST_CLIP_RECT;
import static com.android.server.wm.proto.WindowStateAnimatorProto.SURFACE;
// potentially occurring while turning off the screen. This would lead to the
// screen incorrectly turning back on.
if (!mService.mPowerManager.isInteractive()) {
- mAnimator.mBulkUpdateParams |= SET_TURN_ON_SCREEN;
+ mService.mTurnOnScreen = true;
}
}
}
static final int SET_WALLPAPER_MAY_CHANGE = 1 << 1;
static final int SET_FORCE_HIDING_CHANGED = 1 << 2;
static final int SET_ORIENTATION_CHANGE_COMPLETE = 1 << 3;
- static final int SET_TURN_ON_SCREEN = 1 << 4;
- static final int SET_WALLPAPER_ACTION_PENDING = 1 << 5;
+ static final int SET_WALLPAPER_ACTION_PENDING = 1 << 4;
private boolean mTraversalScheduled;
private int mDeferDepth = 0;