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

Commit a877b9f9 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Skip default animation of embedded activity for scene transition

If the app specifies makeSceneTransitionAnimation. The animation
should be handled by itself.

Bug: 283213473
Test: On device which supports embedded activity:
      Open Settings, search, click back arrow to leave search.
      It should run a fade animation by ExitTransitionCoordinator
      instead of with an additional slide animation.
Change-Id: Ie056da5711c4bc04bf5ccfd1fe12c181daa956c2
parent 9a50b8ad
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package com.android.wm.shell.activityembedding;
package com.android.wm.shell.activityembedding;


import static android.app.ActivityOptions.ANIM_SCENE_TRANSITION;
import static android.window.TransitionInfo.FLAG_FILLS_TASK;
import static android.window.TransitionInfo.FLAG_FILLS_TASK;
import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY;
import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY;


@@ -111,6 +112,11 @@ public class ActivityEmbeddingController implements Transitions.TransitionHandle
        if (containsNonEmbeddedChange && !handleNonEmbeddedChanges(changes)) {
        if (containsNonEmbeddedChange && !handleNonEmbeddedChanges(changes)) {
            return false;
            return false;
        }
        }
        final TransitionInfo.AnimationOptions options = info.getAnimationOptions();
        if (options != null && options.getType() == ANIM_SCENE_TRANSITION) {
            // Scene-transition will be handled by app side.
            return false;
        }


        // Start ActivityEmbedding animation.
        // Start ActivityEmbedding animation.
        mTransitionCallbacks.put(transition, finishCallback);
        mTransitionCallbacks.put(transition, finishCallback);