Merge "Dispatch organized tasks info chagne when committing visibility" into sc-v2-dev am: 05b2d626e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15926312 Change-Id: Idf7bcd77ace89a81ce8348ef143eda42bd271f53
This commit is contained in:
@@ -4946,11 +4946,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
// dispatchTaskInfoChangedIfNeeded() right after ActivityRecord#setVisibility() can report
|
// dispatchTaskInfoChangedIfNeeded() right after ActivityRecord#setVisibility() can report
|
||||||
// the stale visible state, because the state will be updated after the app transition.
|
// the stale visible state, because the state will be updated after the app transition.
|
||||||
// So tries to report the actual visible state again where the state is changed.
|
// So tries to report the actual visible state again where the state is changed.
|
||||||
if (!mTaskSupervisor.inActivityVisibilityUpdate()) {
|
Task task = getOrganizedTask();
|
||||||
final Task task = getOrganizedTask();
|
while (task != null) {
|
||||||
if (task != null) {
|
task.dispatchTaskInfoChangedIfNeeded(false /* force */);
|
||||||
task.dispatchTaskInfoChangedIfNeeded(false /* force */);
|
task = task.getParent().asTask();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS,
|
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS,
|
||||||
"commitVisibility: %s: visible=%b mVisibleRequested=%b", this,
|
"commitVisibility: %s: visible=%b mVisibleRequested=%b", this,
|
||||||
|
|||||||
@@ -4809,10 +4809,6 @@ class Task extends TaskFragment {
|
|||||||
notifyClients);
|
notifyClients);
|
||||||
}, true /* traverseTopToBottom */);
|
}, true /* traverseTopToBottom */);
|
||||||
|
|
||||||
// Notify WM shell that task visibilities may have changed
|
|
||||||
forAllTasks(task -> task.dispatchTaskInfoChangedIfNeeded(/* force */ false),
|
|
||||||
true /* traverseTopToBottom */);
|
|
||||||
|
|
||||||
if (mTranslucentActivityWaiting != null &&
|
if (mTranslucentActivityWaiting != null &&
|
||||||
mUndrawnActivitiesBelowTopTranslucent.isEmpty()) {
|
mUndrawnActivitiesBelowTopTranslucent.isEmpty()) {
|
||||||
// Nothing is getting drawn or everything was already visible, don't wait for
|
// Nothing is getting drawn or everything was already visible, don't wait for
|
||||||
|
|||||||
Reference in New Issue
Block a user