Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a832ca15 authored by Evan Rosky's avatar Evan Rosky
Browse files

Move readytrack flag check to be per-condition

This lets us introduce new conditions using the
new system while keeping the legacy-migration
behind a flag.

We now actually track the legacy-migration conditions
but ignore them when determining readiness. This
will support monitoring of the migration status.

Bug: 294925498
Test: existing tests (mechanical refactor)
Flag: com.android.window.flags.transit_ready_tracking
Change-Id: I93eb7ef95bf927a9646c44455b4ef9002106c19e
parent b57efbd4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1663,7 +1663,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }

        final Transition.ReadyCondition displayConfig = mTransitionController.isCollecting()
                ? new Transition.ReadyCondition("displayConfig", this) : null;
                ? new Transition.ReadyCondition("displayConfig", this, true /* newTrockerOnly */)
                : null;
        if (displayConfig != null) {
            mTransitionController.waitFor(displayConfig);
        } else if (mTransitionController.isShellTransitionsEnabled() && mLastHasContent) {
+1 −1
Original line number Diff line number Diff line
@@ -636,7 +636,7 @@ class KeyguardController {
        if (waiting && isAodShowing(DEFAULT_DISPLAY)) {
            mWaitingForWakeTransition = true;
            mWindowManager.mAtmService.getTransitionController().deferTransitionReady();
            mWaitAodHide = new Transition.ReadyCondition("AOD hidden");
            mWaitAodHide = new Transition.ReadyCondition("AOD hidden", true /* newTrackerOnly */);
            mWindowManager.mAtmService.getTransitionController().waitFor(mWaitAodHide);
            mWindowManager.mH.postDelayed(mResetWaitTransition, DEFER_WAKE_TRANSITION_TIMEOUT_MS);
        } else if (!waiting) {
+2 −1
Original line number Diff line number Diff line
@@ -2053,7 +2053,8 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
        final TransitionController transitionController = task.mTransitionController;

        transitionController.deferTransitionReady();
        Transition.ReadyCondition pipChangesApplied = new Transition.ReadyCondition("movedToPip");
        final Transition.ReadyCondition pipChangesApplied =
                new Transition.ReadyCondition("movedToPip", true /* newTrackerOnly */);
        transitionController.waitFor(pipChangesApplied);
        mService.deferWindowLayout();
        boolean localVisibilityDeferred = false;
+1 −1
Original line number Diff line number Diff line
@@ -5991,7 +5991,7 @@ class Task extends TaskFragment {

    private void moveTaskToBackInner(@NonNull Task task, @Nullable Transition transition) {
        final Transition.ReadyCondition movedToBack =
                new Transition.ReadyCondition("moved-to-back", task);
                new Transition.ReadyCondition("moved-to-back", task, true /* newTrackerOnly */);
        if (transition != null) {
            // Preventing from update surface position for WindowState if configuration changed,
            // because the position is depends on WindowFrame, so update the position before
+1 −1
Original line number Diff line number Diff line
@@ -534,7 +534,7 @@ public class TaskFragmentOrganizerController extends ITaskFragmentOrganizerContr
            mDeferredTransitions.put(transaction.getTransactionToken(), transitionId);
            mWindowOrganizerController.getTransitionController().deferTransitionReady();
            final Transition.ReadyCondition transactionApplied = new Transition.ReadyCondition(
                    "task-fragment transaction", transaction);
                    "task-fragment transaction", transaction, true /* newTrackerOnly */);
            mWindowOrganizerController.getTransitionController().waitFor(transactionApplied);
            mInFlightTransactions.put(transaction.getTransactionToken(), transactionApplied);
        }
Loading