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

Commit dba1f04a authored by Annie Lin's avatar Annie Lin
Browse files

Add ANIM_FROM_STYLE to the list of animations that the default Shell transition handler can run.

WindowAnimationStyle theme attribute in Shell support was added in ag/16431811 but isSupportedOverrideAnimation was never updated to indicate that ANIM_FROM_STYLE can be supported.

Change-Id: I10e348ccce5deca86ed9197347942a332b8c307d
Test: Make sure demo app with ActivityEmbedding with custom animations set using WindowAnimationStyle actually uses the custom animation. (ActivityEmbeddingController is the only callsite for isSupportedOverrideAnimation.)
Flag: EXEMPT bugfix
Bug: 206960607
Bug: 293658614
parent 4da774e4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.wm.shell.transition;
import static android.app.ActivityOptions.ANIM_CLIP_REVEAL;
import static android.app.ActivityOptions.ANIM_CUSTOM;
import static android.app.ActivityOptions.ANIM_NONE;
import static android.app.ActivityOptions.ANIM_FROM_STYLE;
import static android.app.ActivityOptions.ANIM_OPEN_CROSS_PROFILE_APPS;
import static android.app.ActivityOptions.ANIM_SCALE_UP;
import static android.app.ActivityOptions.ANIM_SCENE_TRANSITION;
@@ -985,7 +986,8 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
        final int animType = options.getType();
        return animType == ANIM_CUSTOM || animType == ANIM_SCALE_UP
                || animType == ANIM_THUMBNAIL_SCALE_UP || animType == ANIM_THUMBNAIL_SCALE_DOWN
                || animType == ANIM_CLIP_REVEAL || animType == ANIM_OPEN_CROSS_PROFILE_APPS;
                || animType == ANIM_CLIP_REVEAL || animType == ANIM_OPEN_CROSS_PROFILE_APPS
                || animType == ANIM_FROM_STYLE;
    }

    private static void applyTransformation(long time, SurfaceControl.Transaction t,