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

Commit 9f70d5ea authored by Yifei Zhang's avatar Yifei Zhang
Browse files

backnav: don't reset back tracker at start

- updateStartLocation will reset the BackTracker internal state and
  update the start position of the progress calculation
- Updating at animation start will cause a significant offset for small
  screen devices. This is especially obvious on Wear OS.
- Skipping will not cause a direct jump in animation. There is a visible
  spring effect when the animation catches up with back progress.

Bug: 381150378
Test: build & flash
Flag: EXEMPT, bug fix
Change-Id: I2fb1be277f328fc3ef556804c2bc6dbc02c68c29
parent 8b379c95
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1093,7 +1093,6 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
                () -> mShellExecutor.execute(this::onBackAnimationFinished));

        if (mApps.length >= 1) {
            mCurrentTracker.updateStartLocation();
            BackMotionEvent startEvent = mCurrentTracker.createStartEvent(mApps[0]);
            dispatchOnBackStarted(mActiveCallback, startEvent);
            if (startEvent.getSwipeEdge() == EDGE_NONE) {