Merge "Don't applyReady immediately if WCT is launching activity" into udc-qpr-dev
This commit is contained in:
@@ -309,6 +309,14 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
||||
applyTransaction(wct, -1 /* syncId */, nextTransition, caller,
|
||||
deferred);
|
||||
if (needsSetReady) {
|
||||
// TODO(b/294925498): Remove this once we have accurate ready
|
||||
// tracking.
|
||||
if (hasActivityLaunch(wct) && !mService.mRootWindowContainer
|
||||
.allPausedActivitiesComplete()) {
|
||||
// WCT is launching an activity, so we need to wait for its
|
||||
// lifecycle events.
|
||||
return;
|
||||
}
|
||||
nextTransition.setAllReady();
|
||||
}
|
||||
});
|
||||
@@ -344,6 +352,15 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean hasActivityLaunch(WindowContainerTransaction wct) {
|
||||
for (int i = 0; i < wct.getHierarchyOps().size(); ++i) {
|
||||
if (wct.getHierarchyOps().get(i).getType() == HIERARCHY_OP_TYPE_LAUNCH_TASK) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int startLegacyTransition(int type, @NonNull RemoteAnimationAdapter adapter,
|
||||
@NonNull IWindowContainerTransactionCallback callback,
|
||||
|
||||
Reference in New Issue
Block a user