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

Commit 4b86a040 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Ensure that participated activities are not omitted by ancestor

... when preparing transition targets.

Previously, the first step of the calculation finds the top participant
if possible, and once there is one, only the level above task will be
added. Because it assumes that the parent of participant can represent
it. But there are more than one participants belong to an ancestor, the
descendants may have individual changes, so they should be still in the
transition targets. Otherwise the animation may have nothing to do.

Now all valid participants are added into the target lists, and then
combine the targets from bottom to up based on depth. So it can be
done in 1 pass (originally it requires 3 passes when launching a new
task from home, 4 passes when starting recents).

The population of ChangeInfo#mParent is moved after tryPromo so it
can skip the targets which were removed, and the parent info can
be updated in a single place.

Bug: 213867980
Test: TransitionTests#testOpenActivityInTheSameTaskWithDisplayChange
Test: adb shell setprop persist.debug.shell_transit 1; reboot
      Start a landscape activity from a portrait activity in the
      same task. The animation should not jump cut.

Change-Id: I23a3326611dcb5664b204748280ae15b2377f318
parent d5b09e89
Loading
Loading
Loading
Loading
+24 −48
Original line number Diff line number Diff line
@@ -355,6 +355,12 @@
      "group": "WM_DEBUG_ORIENTATION",
      "at": "com\/android\/server\/wm\/DisplayRotation.java"
    },
    "-1728919185": {
      "message": "        unrelated invisible sibling %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-1715268616": {
      "message": "Last window, removing starting window %s",
      "level": "VERBOSE",
@@ -451,12 +457,6 @@
      "group": "WM_DEBUG_REMOTE_ANIMATIONS",
      "at": "com\/android\/server\/wm\/RemoteAnimationController.java"
    },
    "-1587921395": {
      "message": "  Top targets: %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-1585311008": {
      "message": "Bring to front target: %s from %s",
      "level": "DEBUG",
@@ -709,12 +709,6 @@
      "group": "WM_DEBUG_TASKS",
      "at": "com\/android\/server\/wm\/RootWindowContainer.java"
    },
    "-1375751630": {
      "message": "  --- Start combine pass ---",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-1364754753": {
      "message": "Task vanished taskId=%d",
      "level": "VERBOSE",
@@ -1177,12 +1171,6 @@
      "group": "WM_DEBUG_IME",
      "at": "com\/android\/server\/wm\/ImeInsetsSourceProvider.java"
    },
    "-855366859": {
      "message": "        merging children in from %s: %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-853404763": {
      "message": "\twallpaper=%s",
      "level": "DEBUG",
@@ -1243,6 +1231,12 @@
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-779095785": {
      "message": "        sibling is a participant with mode %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-775004869": {
      "message": "Not a match: %s",
      "level": "DEBUG",
@@ -1555,12 +1549,6 @@
      "group": "WM_DEBUG_CONFIGURATION",
      "at": "com\/android\/server\/wm\/ActivityTaskManagerService.java"
    },
    "-446752714": {
      "message": "        SKIP: sibling contains top target %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-445944810": {
      "message": "finish(%b): mCanceled=%b",
      "level": "DEBUG",
@@ -1729,12 +1717,6 @@
      "group": "WM_DEBUG_RECENTS_ANIMATIONS",
      "at": "com\/android\/server\/wm\/RecentsAnimation.java"
    },
    "-302335479": {
      "message": "        remove from topTargets %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "-292790591": {
      "message": "Attempted to set IME policy to a display that does not exist: %d",
      "level": "WARN",
@@ -2077,6 +2059,12 @@
      "group": "WM_DEBUG_STARTING_WINDOW",
      "at": "com\/android\/server\/wm\/ActivityRecord.java"
    },
    "112145970": {
      "message": "      SKIP: its sibling was rejected",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "114070759": {
      "message": "New wallpaper target: %s prevTarget: %s caller=%s",
      "level": "VERBOSE",
@@ -2413,6 +2401,12 @@
      "group": "WM_SHOW_SURFACE_ALLOC",
      "at": "com\/android\/server\/wm\/RootWindowContainer.java"
    },
    "405146734": {
      "message": "  Final targets: %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "416924848": {
      "message": "InsetsSource Control %s for target %s",
      "level": "DEBUG",
@@ -2437,12 +2431,6 @@
      "group": "WM_ERROR",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    "430260320": {
      "message": "        sibling is a top target with mode %s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "431715812": {
      "message": "Launch on display check: allow launch any on display",
      "level": "DEBUG",
@@ -2761,12 +2749,6 @@
      "group": "WM_SHOW_SURFACE_ALLOC",
      "at": "com\/android\/server\/wm\/WindowStateAnimator.java"
    },
    "751854538": {
      "message": "DisplayArea keep clear rects changed name =%s",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_ORGANIZER",
      "at": "com\/android\/server\/wm\/DisplayAreaOrganizerController.java"
    },
    "765395228": {
      "message": "onAnimationFinished(): controller=%s reorderMode=%d",
      "level": "DEBUG",
@@ -3097,12 +3079,6 @@
      "group": "WM_DEBUG_WALLPAPER",
      "at": "com\/android\/server\/wm\/WallpaperController.java"
    },
    "1186730970": {
      "message": "          no common mode yet, so set it",
      "level": "VERBOSE",
      "group": "WM_DEBUG_WINDOW_TRANSITIONS",
      "at": "com\/android\/server\/wm\/Transition.java"
    },
    "1191587912": {
      "message": "Moved rootTask=%s behind rootTask=%s",
      "level": "DEBUG",