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

Commit e0a9fcc6 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by wilsonshih
Browse files

Revert^2 "Remove DepartingAnimationTarget from BackMotionEvent"

This would create another SurfaceControl object through IPC, which is
unnecessary because the animation should run through
BackAnimationRunner.

Flag: com.android.window.flags.remove_depart_target_from_motion
Bug: 395035430
Test: execute back-to-home transition several times, verify no
predict_back animation leash left in offscreen layer.

Change-Id: Ic9c24402a3e121be98251965ede375ad61991e4e
parent 440faf35
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -387,6 +387,17 @@ flag {
    bug: "373544911"
}

flag {
    name: "remove_depart_target_from_motion"
    namespace: "windowing_frontend"
    description: "Remove DepartingAnimationTarget from BackMotionEvent"
    bug: "395035430"
    is_fixed_read_only: true
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "predictive_back_default_enable_sdk_36"
    namespace: "systemui"
+2 −1
Original line number Diff line number Diff line
@@ -1045,7 +1045,8 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
                () -> mShellExecutor.execute(this::onBackAnimationFinished));

        if (mApps.length >= 1) {
            BackMotionEvent startEvent = mCurrentTracker.createStartEvent(mApps[0]);
            BackMotionEvent startEvent = mCurrentTracker.createStartEvent(
                    Flags.removeDepartTargetFromMotion() ? null : mApps[0]);
            dispatchOnBackStarted(mActiveCallback, startEvent);
            if (startEvent.getSwipeEdge() == EDGE_NONE) {
                // TODO(b/373544911): onBackStarted is dispatched here so that