Merge "Make TransitionController's helper handle start and queue" into udc-dev
This commit is contained in:
@@ -175,12 +175,6 @@
|
||||
"group": "WM_ERROR",
|
||||
"at": "com\/android\/server\/wm\/WindowManagerService.java"
|
||||
},
|
||||
"-1941440781": {
|
||||
"message": "Creating Pending Move-to-back: %s",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_DEBUG_WINDOW_TRANSITIONS",
|
||||
"at": "com\/android\/server\/wm\/Task.java"
|
||||
},
|
||||
"-1939861963": {
|
||||
"message": "Create root task displayId=%d winMode=%d",
|
||||
"level": "VERBOSE",
|
||||
@@ -631,12 +625,6 @@
|
||||
"group": "WM_DEBUG_CONFIGURATION",
|
||||
"at": "com\/android\/server\/wm\/ActivityStarter.java"
|
||||
},
|
||||
"-1484988952": {
|
||||
"message": "Creating Pending Multiwindow Fullscreen Request: %s",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_DEBUG_WINDOW_TRANSITIONS",
|
||||
"at": "com\/android\/server\/wm\/ActivityClientController.java"
|
||||
},
|
||||
"-1483435730": {
|
||||
"message": "InsetsSource setWin %s for type %s",
|
||||
"level": "DEBUG",
|
||||
@@ -2605,12 +2593,6 @@
|
||||
"group": "WM_DEBUG_ANIM",
|
||||
"at": "com\/android\/server\/wm\/WindowState.java"
|
||||
},
|
||||
"286170861": {
|
||||
"message": "Creating Pending Transition for TaskFragment: %s",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_DEBUG_WINDOW_TRANSITIONS",
|
||||
"at": "com\/android\/server\/wm\/WindowOrganizerController.java"
|
||||
},
|
||||
"288485303": {
|
||||
"message": "Attempted to set remove mode to a display that does not exist: %d",
|
||||
"level": "WARN",
|
||||
@@ -3193,12 +3175,6 @@
|
||||
"group": "WM_DEBUG_APP_TRANSITIONS",
|
||||
"at": "com\/android\/server\/wm\/AppTransitionController.java"
|
||||
},
|
||||
"800698875": {
|
||||
"message": "SyncGroup %d: Started when there is other active SyncGroup",
|
||||
"level": "WARN",
|
||||
"group": "WM_DEBUG_SYNC_ENGINE",
|
||||
"at": "com\/android\/server\/wm\/BLASTSyncEngine.java"
|
||||
},
|
||||
"801521566": {
|
||||
"message": "Content Recording: Attempting to mirror %d from %d but no DisplayContent associated. Changing to mirror default display.",
|
||||
"level": "WARN",
|
||||
@@ -3259,12 +3235,6 @@
|
||||
"group": "WM_DEBUG_STATES",
|
||||
"at": "com\/android\/server\/wm\/RootWindowContainer.java"
|
||||
},
|
||||
"898260097": {
|
||||
"message": "Creating Pending Pip-Enter: %s",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_DEBUG_WINDOW_TRANSITIONS",
|
||||
"at": "com\/android\/server\/wm\/ActivityTaskManagerService.java"
|
||||
},
|
||||
"898863925": {
|
||||
"message": "Attempted to add QS dialog window with unknown token %s. Aborting.",
|
||||
"level": "WARN",
|
||||
@@ -4009,12 +3979,6 @@
|
||||
"group": "WM_DEBUG_CONTENT_RECORDING",
|
||||
"at": "com\/android\/server\/wm\/ContentRecorder.java"
|
||||
},
|
||||
"1667162379": {
|
||||
"message": "Creating Pending Transition: %s",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_DEBUG_WINDOW_TRANSITIONS",
|
||||
"at": "com\/android\/server\/wm\/WindowOrganizerController.java"
|
||||
},
|
||||
"1670933628": {
|
||||
"message": " Setting allReady override",
|
||||
"level": "VERBOSE",
|
||||
@@ -4075,6 +4039,12 @@
|
||||
"group": "WM_DEBUG_SYNC_ENGINE",
|
||||
"at": "com\/android\/server\/wm\/BLASTSyncEngine.java"
|
||||
},
|
||||
"1735199721": {
|
||||
"message": "Queueing transition: %s",
|
||||
"level": "VERBOSE",
|
||||
"group": "WM_DEBUG_WINDOW_TRANSITIONS_MIN",
|
||||
"at": "com\/android\/server\/wm\/TransitionController.java"
|
||||
},
|
||||
"1739298851": {
|
||||
"message": "removeWindowToken: Attempted to remove token: %s for non-exiting displayId=%d",
|
||||
"level": "WARN",
|
||||
|
||||
@@ -97,7 +97,6 @@ import android.window.TransitionInfo;
|
||||
|
||||
import com.android.internal.app.AssistUtils;
|
||||
import com.android.internal.policy.IKeyguardDismissCallback;
|
||||
import com.android.internal.protolog.ProtoLogGroup;
|
||||
import com.android.internal.protolog.common.ProtoLog;
|
||||
import com.android.server.LocalServices;
|
||||
import com.android.server.Watchdog;
|
||||
@@ -1142,18 +1141,11 @@ class ActivityClientController extends IActivityClientController.Stub {
|
||||
// Initiate the transition.
|
||||
final Transition transition = new Transition(TRANSIT_CHANGE, 0 /* flags */, controller,
|
||||
mService.mWindowManager.mSyncEngine);
|
||||
if (mService.mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
|
||||
"Creating Pending Multiwindow Fullscreen Request: %s", transition);
|
||||
r.mTransitionController.queueCollecting(transition,
|
||||
() -> {
|
||||
executeFullscreenRequestTransition(fullscreenRequest, callback, r,
|
||||
transition, true /* queued */);
|
||||
});
|
||||
} else {
|
||||
executeFullscreenRequestTransition(fullscreenRequest, callback, r, transition,
|
||||
false /* queued */);
|
||||
}
|
||||
r.mTransitionController.startCollectOrQueue(transition,
|
||||
(deferred) -> {
|
||||
executeFullscreenRequestTransition(fullscreenRequest, callback, r,
|
||||
transition, deferred);
|
||||
});
|
||||
}
|
||||
|
||||
private void executeFullscreenRequestTransition(int fullscreenRequest, IRemoteCallback callback,
|
||||
|
||||
@@ -9806,7 +9806,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
if (mTransitionController.isShellTransitionsEnabled()) {
|
||||
final Transition transition = new Transition(TRANSIT_RELAUNCH, 0 /* flags */,
|
||||
mTransitionController, mWmService.mSyncEngine);
|
||||
final Runnable executeRestart = () -> {
|
||||
mTransitionController.startCollectOrQueue(transition, (deferred) -> {
|
||||
if (mState != RESTARTING_PROCESS || !attachedToProcess()) {
|
||||
transition.abort();
|
||||
return;
|
||||
@@ -9818,13 +9818,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
mTransitionController.requestStartTransition(transition, task,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
scheduleStopForRestartProcess();
|
||||
};
|
||||
if (mWmService.mSyncEngine.hasActiveSync()) {
|
||||
mTransitionController.queueCollecting(transition, executeRestart);
|
||||
} else {
|
||||
mTransitionController.moveToCollecting(transition);
|
||||
executeRestart.run();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
startFreezingScreen();
|
||||
scheduleStopForRestartProcess();
|
||||
|
||||
@@ -250,7 +250,6 @@ import com.android.internal.notification.SystemNotificationChannels;
|
||||
import com.android.internal.os.TransferPipe;
|
||||
import com.android.internal.policy.AttributeCache;
|
||||
import com.android.internal.policy.KeyguardDismissCallback;
|
||||
import com.android.internal.protolog.ProtoLogGroup;
|
||||
import com.android.internal.protolog.common.ProtoLog;
|
||||
import com.android.internal.util.ArrayUtils;
|
||||
import com.android.internal.util.FastPrintWriter;
|
||||
@@ -2873,28 +2872,19 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
|
||||
final Transition transition = new Transition(TRANSIT_CHANGE, 0 /* flags */,
|
||||
getTransitionController(), mWindowManager.mSyncEngine);
|
||||
if (mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
getTransitionController().queueCollecting(transition,
|
||||
() -> {
|
||||
if (!task.getWindowConfiguration().canResizeTask()) {
|
||||
Slog.w(TAG, "resizeTask not allowed on task=" + task);
|
||||
transition.abort();
|
||||
return;
|
||||
}
|
||||
getTransitionController().requestStartTransition(transition, task,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
getTransitionController().collect(task);
|
||||
task.resize(bounds, resizeMode, preserveWindow);
|
||||
transition.setReady(task, true);
|
||||
});
|
||||
} else {
|
||||
getTransitionController().moveToCollecting(transition);
|
||||
getTransitionController().requestStartTransition(transition, task,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
getTransitionController().collect(task);
|
||||
task.resize(bounds, resizeMode, preserveWindow);
|
||||
transition.setReady(task, true);
|
||||
}
|
||||
getTransitionController().startCollectOrQueue(transition,
|
||||
(deferred) -> {
|
||||
if (deferred && !task.getWindowConfiguration().canResizeTask()) {
|
||||
Slog.w(TAG, "resizeTask not allowed on task=" + task);
|
||||
transition.abort();
|
||||
return;
|
||||
}
|
||||
getTransitionController().requestStartTransition(transition, task,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
getTransitionController().collect(task);
|
||||
task.resize(bounds, resizeMode, preserveWindow);
|
||||
transition.setReady(task, true);
|
||||
});
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(ident);
|
||||
@@ -3625,30 +3615,25 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
mActivityClientController.dismissKeyguard(r.token, new KeyguardDismissCallback() {
|
||||
@Override
|
||||
public void onDismissSucceeded() {
|
||||
if (transition != null && mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
|
||||
"Creating Pending Pip-Enter: %s", transition);
|
||||
getTransitionController().queueCollecting(transition, enterPipRunnable);
|
||||
} else {
|
||||
// Move to collecting immediately to "claim" the sync-engine for this
|
||||
// transition.
|
||||
if (transition != null) {
|
||||
getTransitionController().moveToCollecting(transition);
|
||||
}
|
||||
if (transition == null) {
|
||||
mH.post(enterPipRunnable);
|
||||
return;
|
||||
}
|
||||
getTransitionController().startCollectOrQueue(transition, (deferred) -> {
|
||||
if (deferred) {
|
||||
enterPipRunnable.run();
|
||||
} else {
|
||||
mH.post(enterPipRunnable);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, null /* message */);
|
||||
} else {
|
||||
// Enter picture in picture immediately otherwise
|
||||
if (transition != null && mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
|
||||
"Creating Pending Pip-Enter: %s", transition);
|
||||
getTransitionController().queueCollecting(transition, enterPipRunnable);
|
||||
if (transition != null) {
|
||||
getTransitionController().startCollectOrQueue(transition,
|
||||
(deferred) -> enterPipRunnable.run());
|
||||
} else {
|
||||
if (transition != null) {
|
||||
getTransitionController().moveToCollecting(transition);
|
||||
}
|
||||
enterPipRunnable.run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2328,17 +2328,23 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
|
||||
// this as a signal to the transition-player.
|
||||
final Transition transition = new Transition(TRANSIT_SLEEP, 0 /* flags */,
|
||||
display.mTransitionController, mWmService.mSyncEngine);
|
||||
final Runnable sendSleepTransition = () -> {
|
||||
final TransitionController.OnStartCollect sendSleepTransition = (deferred) -> {
|
||||
display.mTransitionController.requestStartTransition(transition,
|
||||
null /* trigger */, null /* remote */, null /* display */);
|
||||
// Force playing immediately so that unrelated ops can't be collected.
|
||||
transition.playNow();
|
||||
};
|
||||
if (display.mTransitionController.isCollecting()) {
|
||||
display.mTransitionController.queueCollecting(transition, sendSleepTransition);
|
||||
} else {
|
||||
if (!display.mTransitionController.isCollecting()) {
|
||||
// Since this bypasses sync, submit directly ignoring whether sync-engine
|
||||
// is active.
|
||||
if (mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
Slog.w(TAG, "Ongoing sync outside of a transition.");
|
||||
}
|
||||
display.mTransitionController.moveToCollecting(transition);
|
||||
sendSleepTransition.run();
|
||||
sendSleepTransition.onCollectStarted(false /* deferred */);
|
||||
} else {
|
||||
display.mTransitionController.startCollectOrQueue(transition,
|
||||
sendSleepTransition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,6 @@ import android.window.WindowContainerToken;
|
||||
import com.android.internal.annotations.GuardedBy;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.internal.app.IVoiceInteractor;
|
||||
import com.android.internal.protolog.ProtoLogGroup;
|
||||
import com.android.internal.protolog.common.ProtoLog;
|
||||
import com.android.internal.util.XmlUtils;
|
||||
import com.android.internal.util.function.pooled.PooledLambda;
|
||||
@@ -5632,29 +5631,20 @@ class Task extends TaskFragment {
|
||||
final Transition transition = new Transition(TRANSIT_TO_BACK, 0 /* flags */,
|
||||
mTransitionController, mWmService.mSyncEngine);
|
||||
// Guarantee that this gets its own transition by queueing on SyncEngine
|
||||
if (mWmService.mSyncEngine.hasActiveSync()) {
|
||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
|
||||
"Creating Pending Move-to-back: %s", transition);
|
||||
mTransitionController.queueCollecting(transition,
|
||||
() -> {
|
||||
// Need to check again since this happens later and the system might
|
||||
// be in a different state.
|
||||
if (!canMoveTaskToBack(tr)) {
|
||||
Slog.e(TAG, "Failed to move task to back after saying we could: "
|
||||
+ tr.mTaskId);
|
||||
transition.abort();
|
||||
return;
|
||||
}
|
||||
mTransitionController.requestStartTransition(transition, tr,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
moveTaskToBackInner(tr);
|
||||
});
|
||||
} else {
|
||||
mTransitionController.moveToCollecting(transition);
|
||||
mTransitionController.requestStartTransition(transition, tr,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
moveTaskToBackInner(tr);
|
||||
}
|
||||
mTransitionController.startCollectOrQueue(transition,
|
||||
(deferred) -> {
|
||||
// Need to check again if deferred since the system might
|
||||
// be in a different state.
|
||||
if (deferred && !canMoveTaskToBack(tr)) {
|
||||
Slog.e(TAG, "Failed to move task to back after saying we could: "
|
||||
+ tr.mTaskId);
|
||||
transition.abort();
|
||||
return;
|
||||
}
|
||||
mTransitionController.requestStartTransition(transition, tr,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
moveTaskToBackInner(tr);
|
||||
});
|
||||
} else {
|
||||
// Skip the transition for pinned task.
|
||||
if (!inPinnedWindowingMode()) {
|
||||
|
||||
@@ -884,13 +884,30 @@ class TransitionController {
|
||||
proto.end(token);
|
||||
}
|
||||
|
||||
void queueCollecting(Transition transit, Runnable onCollectStart) {
|
||||
mAtm.mWindowManager.mSyncEngine.queueSyncSet(
|
||||
// Make sure to collect immediately to prevent another transition
|
||||
// from sneaking in before it. Note: moveToCollecting internally
|
||||
// calls startSyncSet.
|
||||
() -> moveToCollecting(transit),
|
||||
onCollectStart);
|
||||
/** Returns {@code true} if it started collecting, {@code false} if it was queued. */
|
||||
boolean startCollectOrQueue(Transition transit, OnStartCollect onStartCollect) {
|
||||
if (mAtm.mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
if (!isCollecting()) {
|
||||
Slog.w(TAG, "Ongoing Sync outside of transition.");
|
||||
}
|
||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS_MIN,
|
||||
"Queueing transition: %s", transit);
|
||||
mAtm.mWindowManager.mSyncEngine.queueSyncSet(
|
||||
// Make sure to collect immediately to prevent another transition
|
||||
// from sneaking in before it. Note: moveToCollecting internally
|
||||
// calls startSyncSet.
|
||||
() -> moveToCollecting(transit),
|
||||
() -> onStartCollect.onCollectStarted(true /* deferred */));
|
||||
return false;
|
||||
} else {
|
||||
moveToCollecting(transit);
|
||||
onStartCollect.onCollectStarted(false /* deferred */);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
interface OnStartCollect {
|
||||
void onCollectStarted(boolean deferred);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -280,41 +280,31 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
||||
applyTransaction(t, -1 /* syncId */, null, caller);
|
||||
return null;
|
||||
}
|
||||
// In cases where transition is already provided, the "readiness lifecycle" of the
|
||||
// transition is determined outside of this transaction. However, if this is a
|
||||
// direct call from shell, the entire transition lifecycle is contained in the
|
||||
// provided transaction and thus we can setReady immediately after apply.
|
||||
final boolean needsSetReady = transition == null && t != null;
|
||||
final WindowContainerTransaction wct =
|
||||
t != null ? t : new WindowContainerTransaction();
|
||||
if (transition == null) {
|
||||
if (type < 0) {
|
||||
throw new IllegalArgumentException("Can't create transition with no type");
|
||||
}
|
||||
transition = new Transition(type, 0 /* flags */, mTransitionController,
|
||||
mService.mWindowManager.mSyncEngine);
|
||||
// If there is already a collecting transition, queue up a new transition and
|
||||
// return that. The actual start and apply will then be deferred until that
|
||||
// transition starts collecting. This should almost never happen except during
|
||||
// tests.
|
||||
if (mService.mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
Slog.w(TAG, "startTransition() while one is already collecting.");
|
||||
final Transition nextTransition = transition;
|
||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
|
||||
"Creating Pending Transition: %s", nextTransition);
|
||||
mTransitionController.queueCollecting(nextTransition,
|
||||
() -> {
|
||||
nextTransition.start();
|
||||
nextTransition.mLogger.mStartWCT = wct;
|
||||
applyTransaction(wct, -1 /*syncId*/, nextTransition, caller);
|
||||
if (needsSetReady) {
|
||||
nextTransition.setAllReady();
|
||||
}
|
||||
});
|
||||
return nextTransition.getToken();
|
||||
}
|
||||
mTransitionController.moveToCollecting(transition);
|
||||
// This is a direct call from shell, so the entire transition lifecycle is
|
||||
// contained in the provided transaction if provided. Thus, we can setReady
|
||||
// immediately after apply.
|
||||
final boolean needsSetReady = t != null;
|
||||
final Transition nextTransition = new Transition(type, 0 /* flags */,
|
||||
mTransitionController, mService.mWindowManager.mSyncEngine);
|
||||
mTransitionController.startCollectOrQueue(nextTransition,
|
||||
(deferred) -> {
|
||||
nextTransition.start();
|
||||
nextTransition.mLogger.mStartWCT = wct;
|
||||
applyTransaction(wct, -1 /*syncId*/, nextTransition, caller);
|
||||
if (needsSetReady) {
|
||||
nextTransition.setAllReady();
|
||||
}
|
||||
});
|
||||
return nextTransition.getToken();
|
||||
}
|
||||
// The transition already started collecting before sending a request to shell,
|
||||
// so just start here.
|
||||
if (!transition.isCollecting() && !transition.isForcePlaying()) {
|
||||
Slog.e(TAG, "Trying to start a transition that isn't collecting. This probably"
|
||||
+ " means Shell took too long to respond to a request. WM State may be"
|
||||
@@ -325,9 +315,8 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
||||
transition.start();
|
||||
transition.mLogger.mStartWCT = wct;
|
||||
applyTransaction(wct, -1 /*syncId*/, transition, caller);
|
||||
if (needsSetReady) {
|
||||
transition.setAllReady();
|
||||
}
|
||||
// Since the transition is already provided, it means WMCore is determining the
|
||||
// "readiness lifecycle" outside the provided transaction, so don't set ready here.
|
||||
return transition.getToken();
|
||||
}
|
||||
} finally {
|
||||
@@ -432,23 +421,8 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mService.mWindowManager.mSyncEngine.hasActiveSync()) {
|
||||
// Sync is for either transition or applySyncTransaction(). We don't support
|
||||
// multiple sync at the same time because it may cause conflict.
|
||||
// Create a new transition when there is no active sync to collect the changes.
|
||||
final Transition transition = mTransitionController.createTransition(type);
|
||||
if (applyTransaction(wct, -1 /* syncId */, transition, caller)
|
||||
== TRANSACT_EFFECTS_NONE && transition.mParticipants.isEmpty()) {
|
||||
transition.abort();
|
||||
return;
|
||||
}
|
||||
mTransitionController.requestStartTransition(transition, null /* startTask */,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
transition.setAllReady();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!shouldApplyIndependently) {
|
||||
if (mService.mWindowManager.mSyncEngine.hasActiveSync()
|
||||
&& !shouldApplyIndependently) {
|
||||
// Although there is an active sync, we want to apply the transaction now.
|
||||
// TODO(b/232042367) Redesign the organizer update on activity callback so that we
|
||||
// we will know about the transition explicitly.
|
||||
@@ -467,25 +441,23 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
||||
return;
|
||||
}
|
||||
|
||||
// It is ok to queue the WCT until the sync engine is free.
|
||||
final Transition nextTransition = new Transition(type, 0 /* flags */,
|
||||
final Transition transition = new Transition(type, 0 /* flags */,
|
||||
mTransitionController, mService.mWindowManager.mSyncEngine);
|
||||
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
|
||||
"Creating Pending Transition for TaskFragment: %s", nextTransition);
|
||||
mTransitionController.queueCollecting(nextTransition,
|
||||
() -> {
|
||||
if (mTaskFragmentOrganizerController.isValidTransaction(wct)
|
||||
&& (applyTransaction(wct, -1 /* syncId */, nextTransition, caller)
|
||||
!= TRANSACT_EFFECTS_NONE
|
||||
|| !nextTransition.mParticipants.isEmpty())) {
|
||||
mTransitionController.requestStartTransition(nextTransition,
|
||||
null /* startTask */, null /* remoteTransition */,
|
||||
null /* displayChange */);
|
||||
nextTransition.setAllReady();
|
||||
return;
|
||||
}
|
||||
nextTransition.abort();
|
||||
});
|
||||
TransitionController.OnStartCollect doApply = (deferred) -> {
|
||||
if (deferred && !mTaskFragmentOrganizerController.isValidTransaction(wct)) {
|
||||
transition.abort();
|
||||
return;
|
||||
}
|
||||
if (applyTransaction(wct, -1 /* syncId */, transition, caller)
|
||||
== TRANSACT_EFFECTS_NONE && transition.mParticipants.isEmpty()) {
|
||||
transition.abort();
|
||||
return;
|
||||
}
|
||||
mTransitionController.requestStartTransition(transition, null /* startTask */,
|
||||
null /* remoteTransition */, null /* displayChange */);
|
||||
transition.setAllReady();
|
||||
};
|
||||
mTransitionController.startCollectOrQueue(transition, doApply);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(ident);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user