[6/n] Camera Compat UI: Dispatch pending events in task organiser to ensure state update in UI.
Without this change, Task#dispatchTaskInfoChangedIfNeeded led to a pending task event being added in TaskOrganizerController#onTaskInfoChanged but not dispatched which sometimes resulted in the stale state for the camera compat control. Test: manual - no stale state. Bug: 214429446 Change-Id: Ief8891b938ec6116fd3adbc260d3457817ba2e02
This commit is contained in:
@@ -1623,6 +1623,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
}
|
||||
// Trigger TaskInfoChanged to update the camera compat UI.
|
||||
getTask().dispatchTaskInfoChangedIfNeeded(true /* force */);
|
||||
// TaskOrganizerController#onTaskInfoChanged adds pending task events to the queue waiting
|
||||
// for the surface placement to be ready. So need to trigger surface placement to dispatch
|
||||
// events to avoid stale state for the camera compat control.
|
||||
getDisplayContent().setLayoutNeeded();
|
||||
mWmService.mWindowPlacerLocked.performSurfacePlacement();
|
||||
}
|
||||
|
||||
void updateCameraCompatStateFromUser(@CameraCompatControlState int state) {
|
||||
|
||||
Reference in New Issue
Block a user