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

Commit 1bec10ac authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Fixes PiP transition with autoEnterPip in button nav

When in button navigation mode with autoEnterPip enabled, we still need
to resume the top focuses activities when tapping on home.

Video: http://rcll/aaaaaabFQoRHlzixHdtY/fys1jBNOQATN62K4DltfHU
Bug: 179498534
Test: enter PiP in button navigation mode with autoEnterPip on,
      see also the video
Change-Id: I896c2bfeb819969475ba549ffbd64344bc017bc2
parent 444fd918
Loading
Loading
Loading
Loading
+6 −42
Original line number Original line Diff line number Diff line
@@ -811,12 +811,6 @@
      "group": "WM_DEBUG_RECENTS_ANIMATIONS",
      "group": "WM_DEBUG_RECENTS_ANIMATIONS",
      "at": "com\/android\/server\/wm\/RecentsAnimation.java"
      "at": "com\/android\/server\/wm\/RecentsAnimation.java"
    },
    },
    "-1144293044": {
      "message": "SURFACE SET FREEZE LAYER: %s",
      "level": "INFO",
      "group": "WM_SHOW_TRANSACTIONS",
      "at": "com\/android\/server\/wm\/WindowStateAnimator.java"
    },
    "-1142279614": {
    "-1142279614": {
      "message": "Looking for focus: %s, flags=%d, canReceive=%b, reason=%s",
      "message": "Looking for focus: %s, flags=%d, canReceive=%b, reason=%s",
      "level": "VERBOSE",
      "level": "VERBOSE",
@@ -1087,12 +1081,6 @@
      "group": "WM_DEBUG_IME",
      "group": "WM_DEBUG_IME",
      "at": "com\/android\/server\/wm\/ImeInsetsSourceProvider.java"
      "at": "com\/android\/server\/wm\/ImeInsetsSourceProvider.java"
    },
    },
    "-856025122": {
      "message": "SURFACE transparentRegionHint=%s: %s",
      "level": "INFO",
      "group": "WM_SHOW_TRANSACTIONS",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    "-855366859": {
    "-855366859": {
      "message": "        merging children in from %s: %s",
      "message": "        merging children in from %s: %s",
      "level": "VERBOSE",
      "level": "VERBOSE",
@@ -1261,12 +1249,6 @@
      "group": "WM_DEBUG_STATES",
      "group": "WM_DEBUG_STATES",
      "at": "com\/android\/server\/wm\/ActivityTaskSupervisor.java"
      "at": "com\/android\/server\/wm\/ActivityTaskSupervisor.java"
    },
    },
    "-639305784": {
      "message": "Could not report config changes to the window token client.",
      "level": "WARN",
      "group": "WM_ERROR",
      "at": "com\/android\/server\/wm\/WindowToken.java"
    },
    "-639217716": {
    "-639217716": {
      "message": "setFocusedApp %s displayId=%d Callers=%s",
      "message": "setFocusedApp %s displayId=%d Callers=%s",
      "level": "INFO",
      "level": "INFO",
@@ -1417,12 +1399,6 @@
      "group": "WM_DEBUG_KEEP_SCREEN_ON",
      "group": "WM_DEBUG_KEEP_SCREEN_ON",
      "at": "com\/android\/server\/wm\/RootWindowContainer.java"
      "at": "com\/android\/server\/wm\/RootWindowContainer.java"
    },
    },
    "-477481651": {
      "message": "SURFACE DESTROY PENDING: %s. %s",
      "level": "INFO",
      "group": "WM_SHOW_SURFACE_ALLOC",
      "at": "com\/android\/server\/wm\/WindowStateAnimator.java"
    },
    "-463348344": {
    "-463348344": {
      "message": "Removing and adding activity %s to root task at top callers=%s",
      "message": "Removing and adding activity %s to root task at top callers=%s",
      "level": "INFO",
      "level": "INFO",
@@ -1903,12 +1879,6 @@
      "group": "WM_DEBUG_FOCUS_LIGHT",
      "group": "WM_DEBUG_FOCUS_LIGHT",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    },
    "123161180": {
      "message": "SEVER CHILDREN",
      "level": "INFO",
      "group": "WM_SHOW_TRANSACTIONS",
      "at": "com\/android\/server\/wm\/WindowSurfaceController.java"
    },
    "140319294": {
    "140319294": {
      "message": "IME target changed within ActivityRecord",
      "message": "IME target changed within ActivityRecord",
      "level": "DEBUG",
      "level": "DEBUG",
@@ -2569,12 +2539,6 @@
      "group": "WM_DEBUG_REMOTE_ANIMATIONS",
      "group": "WM_DEBUG_REMOTE_ANIMATIONS",
      "at": "com\/android\/server\/wm\/RemoteAnimationController.java"
      "at": "com\/android\/server\/wm\/RemoteAnimationController.java"
    },
    },
    "838570988": {
      "message": "Could not report token removal to the window token client.",
      "level": "WARN",
      "group": "WM_ERROR",
      "at": "com\/android\/server\/wm\/WindowToken.java"
    },
    "872933199": {
    "872933199": {
      "message": "Changing focus from %s to %s displayId=%d Callers=%s",
      "message": "Changing focus from %s to %s displayId=%d Callers=%s",
      "level": "DEBUG",
      "level": "DEBUG",
@@ -2851,12 +2815,6 @@
      "group": "WM_ERROR",
      "group": "WM_ERROR",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    },
    "1217926207": {
      "message": "Activity not running, resuming next.",
      "level": "VERBOSE",
      "group": "WM_DEBUG_STATES",
      "at": "com\/android\/server\/wm\/Task.java"
    },
    "1219600119": {
    "1219600119": {
      "message": "addWindow: win=%s Callers=%s",
      "message": "addWindow: win=%s Callers=%s",
      "level": "DEBUG",
      "level": "DEBUG",
@@ -3355,6 +3313,12 @@
      "group": "WM_DEBUG_STATES",
      "group": "WM_DEBUG_STATES",
      "at": "com\/android\/server\/wm\/Task.java"
      "at": "com\/android\/server\/wm\/Task.java"
    },
    },
    "1847414670": {
      "message": "Activity not running or entered PiP, resuming next.",
      "level": "VERBOSE",
      "group": "WM_DEBUG_STATES",
      "at": "com\/android\/server\/wm\/Task.java"
    },
    "1853793312": {
    "1853793312": {
      "message": "Notify removed startingWindow %s",
      "message": "Notify removed startingWindow %s",
      "level": "VERBOSE",
      "level": "VERBOSE",
+5 −9
Original line number Original line Diff line number Diff line
@@ -5844,12 +5844,8 @@ class Task extends WindowContainer<WindowContainer> {
            mTaskSupervisor.acquireLaunchWakelock();
            mTaskSupervisor.acquireLaunchWakelock();
        }
        }


        if (didAutoPip) {
        // If already entered PIP mode, no need to keep pausing.
            // Already entered PIP mode, no need to keep pausing.
        if (mPausingActivity != null && !didAutoPip) {
            return true;
        }

        if (mPausingActivity != null) {
            // Have the window manager pause its key dispatching until the new
            // Have the window manager pause its key dispatching until the new
            // activity has started.  If we're pausing the activity just because
            // activity has started.  If we're pausing the activity just because
            // the screen is being turned off and the UI is sleeping, don't interrupt
            // the screen is being turned off and the UI is sleeping, don't interrupt
@@ -5872,9 +5868,9 @@ class Task extends WindowContainer<WindowContainer> {
            }
            }


        } else {
        } else {
            // This activity failed to schedule the
            // This activity either failed to schedule the pause or it entered PIP mode,
            // pause, so just treat it as being paused now.
            // so just treat it as being paused now.
            ProtoLog.v(WM_DEBUG_STATES, "Activity not running, resuming next.");
            ProtoLog.v(WM_DEBUG_STATES, "Activity not running or entered PiP, resuming next.");
            if (resuming == null) {
            if (resuming == null) {
                mRootWindowContainer.resumeFocusedTasksTopActivities();
                mRootWindowContainer.resumeFocusedTasksTopActivities();
            }
            }