Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +4 −2 Original line number Diff line number Diff line Loading @@ -655,8 +655,10 @@ public class Transitions implements RemoteCallable<Transitions>, } if (change.hasFlags(FLAG_NO_ANIMATION)) { hasNoAnimation = true; } else { // at-least one relevant participant *is* animated, so we need to animate. } else if (!TransitionUtil.isOrderOnly(change) && !change.hasFlags(FLAG_IS_OCCLUDED)) { // Ignore the order only or occluded changes since they shouldn't be visible during // animation. For anything else, we need to animate if at-least one relevant // participant *is* animated, return false; } } Loading services/core/java/com/android/server/wm/Transition.java +18 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY; import static android.window.TransitionInfo.FLAG_IS_BEHIND_STARTING_WINDOW; import static android.window.TransitionInfo.FLAG_IS_DISPLAY; import static android.window.TransitionInfo.FLAG_IS_INPUT_METHOD; import static android.window.TransitionInfo.FLAG_IS_OCCLUDED; import static android.window.TransitionInfo.FLAG_IS_VOICE_INTERACTION; import static android.window.TransitionInfo.FLAG_IS_WALLPAPER; import static android.window.TransitionInfo.FLAG_MOVED_TO_TOP; Loading Loading @@ -2735,6 +2736,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { out.setAnimationOptions(animOptionsForActivityTransition); } final ArraySet<WindowContainer> occludedAtEndContainers = new ArraySet<>(); // Convert all the resolved ChangeInfos into TransactionInfo.Change objects in order. final int count = sortedTargets.size(); for (int i = 0; i < count; ++i) { Loading @@ -2758,6 +2760,22 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { info.mReadyFlags = change.getFlags(); change.setDisplayId(info.mDisplayId, getDisplayId(target)); // Add FLAGS_IS_OCCLUDED to preventing from visible-translucent change which belows // the non-translucent change playing unexpected open animation. if (change.getMode() == TRANSIT_TO_FRONT || change.getMode() == TRANSIT_OPEN) { for (int occIndex = occludedAtEndContainers.size() - 1; occIndex >= 0; --occIndex) { if (target.isDescendantOf(occludedAtEndContainers.valueAt(occIndex))) { change.setFlags(change.getFlags() | FLAG_IS_OCCLUDED); break; } } } if (!change.hasFlags(FLAG_TRANSLUCENT) && (change.getMode() == TRANSIT_OPEN || change.getMode() == TRANSIT_TO_FRONT || change.getMode() == TRANSIT_CHANGE)) { occludedAtEndContainers.add(target.getParent()); } final Task task = target.asTask(); final TaskFragment taskFragment = target.asTaskFragment(); final boolean isEmbeddedTaskFragment = taskFragment != null Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +4 −2 Original line number Diff line number Diff line Loading @@ -655,8 +655,10 @@ public class Transitions implements RemoteCallable<Transitions>, } if (change.hasFlags(FLAG_NO_ANIMATION)) { hasNoAnimation = true; } else { // at-least one relevant participant *is* animated, so we need to animate. } else if (!TransitionUtil.isOrderOnly(change) && !change.hasFlags(FLAG_IS_OCCLUDED)) { // Ignore the order only or occluded changes since they shouldn't be visible during // animation. For anything else, we need to animate if at-least one relevant // participant *is* animated, return false; } } Loading
services/core/java/com/android/server/wm/Transition.java +18 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY; import static android.window.TransitionInfo.FLAG_IS_BEHIND_STARTING_WINDOW; import static android.window.TransitionInfo.FLAG_IS_DISPLAY; import static android.window.TransitionInfo.FLAG_IS_INPUT_METHOD; import static android.window.TransitionInfo.FLAG_IS_OCCLUDED; import static android.window.TransitionInfo.FLAG_IS_VOICE_INTERACTION; import static android.window.TransitionInfo.FLAG_IS_WALLPAPER; import static android.window.TransitionInfo.FLAG_MOVED_TO_TOP; Loading Loading @@ -2735,6 +2736,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { out.setAnimationOptions(animOptionsForActivityTransition); } final ArraySet<WindowContainer> occludedAtEndContainers = new ArraySet<>(); // Convert all the resolved ChangeInfos into TransactionInfo.Change objects in order. final int count = sortedTargets.size(); for (int i = 0; i < count; ++i) { Loading @@ -2758,6 +2760,22 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { info.mReadyFlags = change.getFlags(); change.setDisplayId(info.mDisplayId, getDisplayId(target)); // Add FLAGS_IS_OCCLUDED to preventing from visible-translucent change which belows // the non-translucent change playing unexpected open animation. if (change.getMode() == TRANSIT_TO_FRONT || change.getMode() == TRANSIT_OPEN) { for (int occIndex = occludedAtEndContainers.size() - 1; occIndex >= 0; --occIndex) { if (target.isDescendantOf(occludedAtEndContainers.valueAt(occIndex))) { change.setFlags(change.getFlags() | FLAG_IS_OCCLUDED); break; } } } if (!change.hasFlags(FLAG_TRANSLUCENT) && (change.getMode() == TRANSIT_OPEN || change.getMode() == TRANSIT_TO_FRONT || change.getMode() == TRANSIT_CHANGE)) { occludedAtEndContainers.add(target.getParent()); } final Task task = target.asTask(); final TaskFragment taskFragment = target.asTaskFragment(); final boolean isEmbeddedTaskFragment = taskFragment != null Loading