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

Commit c058b8aa authored by Louis Chang's avatar Louis Chang
Browse files

Fix transition timeout when launching activity in TaskFragment

Transition timeout due to the sync group was not ready. It was
set to false when an activity was started while a transition
was already collecting. Somehow, the activity was resumed
already because there was no need to pause the previous top
activity. So, the transition won't be set to ready afterwards.

Bug: 274540105
Test: verified both on sample app and Settings
Change-Id: Ib18652f610b448beb12eeb98a473399832d71dc5
parent 36fef761
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1297,6 +1297,12 @@
      "group": "WM_DEBUG_BOOT",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    "-874087484": {
      "message": "SyncGroup %d: Set ready %b",
      "level": "VERBOSE",
      "group": "WM_DEBUG_SYNC_ENGINE",
      "at": "com\/android\/server\/wm\/BLASTSyncEngine.java"
    },
    "-869242375": {
      "message": "Content Recording: Unable to start recording due to invalid region for display %d",
      "level": "VERBOSE",
@@ -4003,12 +4009,6 @@
      "group": "WM_DEBUG_CONFIGURATION",
      "at": "com\/android\/server\/wm\/ActivityRecord.java"
    },
    "1689989893": {
      "message": "SyncGroup %d: Set ready",
      "level": "VERBOSE",
      "group": "WM_DEBUG_SYNC_ENGINE",
      "at": "com\/android\/server\/wm\/BLASTSyncEngine.java"
    },
    "1699269281": {
      "message": "Don't organize or trigger events for untrusted displayId=%d",
      "level": "WARN",
+2 −0
Original line number Diff line number Diff line
@@ -1606,6 +1606,8 @@ class ActivityStarter {
            transitionController.requestStartTransition(newTransition,
                    mTargetTask == null ? started.getTask() : mTargetTask,
                    remoteTransition, null /* displayChange */);
        } else if (result == START_SUCCESS && mStartActivity.isState(RESUMED)) {
            // Do nothing if the activity is started and is resumed directly.
        } else if (isStarted) {
            // Make the collecting transition wait until this request is ready.
            transitionController.setReady(started, false);
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ class BLASTSyncEngine {
            if (mReady == ready) {
                return;
            }
            ProtoLog.v(WM_DEBUG_SYNC_ENGINE, "SyncGroup %d: Set ready", mSyncId);
            ProtoLog.v(WM_DEBUG_SYNC_ENGINE, "SyncGroup %d: Set ready %b", mSyncId, ready);
            mReady = ready;
            if (!ready) return;
            mWm.mWindowPlacerLocked.requestTraversal();