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

Commit 64c8c811 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Remove onBackInvoked workaround for recents animation." into main

parents 5cfdee6b 6c174656
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -1045,12 +1045,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.");