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

Commit 66742491 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix app closing transition in multi-window

Previously we attempted to disable the app closing transition
in multi-window. However, that didn't work because the registered
remote animation was still registered on the ActivityRecord, even
if the activity was restarted, leading to passing a null handler
into post, and then the animation never started.

Enable it in multi-window and also fix the transition.

Test: Enter multi-window, go home
Change-Id: I4d5d46688310b61365ba954fb41811efa29e41a5
Fixes: 72525431
parent 8317b693
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -470,14 +470,14 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag

                float dX = getValue(0, endX, 0, 350, currentPlayTime,
                        Interpolators.AGGRESSIVE_EASE_IN_OUT);
                float dY = (height - height * scale) / 2f;

                TransactionCompat t = new TransactionCompat();
                for (RemoteAnimationTargetCompat app : targets) {
                    if (app.mode == RemoteAnimationTargetCompat.MODE_CLOSING) {
                        t.setAlpha(app.leash, 1f - percent);

                        float dY = (height - (app.clipRect.height() * scale)) / 2f;
                        matrix.postTranslate(dX, dY);
                        matrix.postTranslate(app.position.x, app.position.y);
                        t.setMatrix(app.leash, matrix);
                    }
                    // TODO: Layer should be set only once, but there is possibly a race condition
+1 −3
Original line number Diff line number Diff line
@@ -408,9 +408,7 @@ public class Launcher extends BaseActivity
        mAppTransitionManager = Utilities.getOverrideObject(LauncherAppTransitionManager.class,
                        this, R.string.app_transition_manager_class);

        if (!isInMultiWindowModeCompat()) {
        mAppTransitionManager.registerRemoteAnimations();
        }

        if (mLauncherCallbacks != null) {
            mLauncherCallbacks.onCreate(savedInstanceState);