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

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

Remove onBackInvoked workaround for recents animation.

Legacy recents animation was broken for a while after enable shell
transition, it's unnecessary to maintain it.
For shell transition, after introduce RecentsTransitionHandler, it
will set focus window to recents activity in setInputConsumerEnabled
(ref I10e397db956cad90a4510c326163600f0ed63514), so onBackCallback can
handled by focus window directly.

Bug: 333428882
Test: tried back gesture work in recents when either enable/disable
enable_predictive_back_gesture.

Change-Id: I2e2d6dc7adf0dd9b821b65ff328e434c2600bcf5
parent 4ac36ca5
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -1057,12 +1057,6 @@
      "group": "WM_DEBUG_BACK_PREVIEW",
      "at": "com\/android\/server\/wm\/BackNavigationController.java"
    },
    "-1459414342866553129": {
      "message": "Current focused window being animated by recents. Overriding back callback to recents controller callback.",
      "level": "DEBUG",
      "group": "WM_DEBUG_BACK_PREVIEW",
      "at": "com\/android\/server\/wm\/BackNavigationController.java"
    },
    "2881085074175114605": {
      "message": "Focused window didn't have a valid surface drawn.",
      "level": "DEBUG",
+0 −21
Original line number Diff line number Diff line
@@ -174,27 +174,6 @@ class BackNavigationController {
                }
            }

            // This is needed to bridge the old and new back behavior with recents.  While in
            // Overview with live tile enabled, the previous app is technically focused but we
            // add an input consumer to capture all input that would otherwise go to the apps
            // being controlled by the animation. This means that the window resolved is not
            // the right window to consume back while in overview, so we need to route it to
            // launcher and use the legacy behavior of injecting KEYCODE_BACK since the existing
            // compat callback in VRI only works when the window is focused.
            // This symptom also happen while shell transition enabled, we can check that by
            // isTransientLaunch to know whether the focus window is point to live tile.
            final RecentsAnimationController recentsAnimationController =
                    wmService.getRecentsAnimationController();
            final ActivityRecord tmpAR = window.mActivityRecord;
            if ((tmpAR != null && tmpAR.isActivityTypeHomeOrRecents()
                    && tmpAR.mTransitionController.isTransientLaunch(tmpAR))
                    || (recentsAnimationController != null
                    && recentsAnimationController.shouldApplyInputConsumer(tmpAR))) {
                ProtoLog.d(WM_DEBUG_BACK_PREVIEW, "Current focused window being animated by "
                        + "recents. Overriding back callback to recents controller callback.");
                return null;
            }

            if (!window.isDrawn()) {
                ProtoLog.d(WM_DEBUG_BACK_PREVIEW,
                        "Focused window didn't have a valid surface drawn.");