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

Commit 53f6ec36 authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Provide app-process tokens to remote transitions so they can be...

Merge "Provide app-process tokens to remote transitions so they can be boosted" into sc-v2-dev am: a3defa4d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15633306

Change-Id: I5484bb00f11d9dfde24e5291dfbc12285b9d9006
parents dead62bf a3defa4d
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -17,11 +17,8 @@ package com.android.launcher3;

import android.animation.AnimatorSet;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.CancellationSignal;
import android.os.Handler;

import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.RemoteAnimationProvider;
@@ -78,11 +75,4 @@ public class LauncherInitListener extends ActivityInitListener<Launcher> {
        mRemoteAnimationProvider = null;
        super.unregister();
    }

    @Override
    public void registerAndStartActivity(Intent intent, RemoteAnimationProvider animProvider,
            Context context, Handler handler, long duration) {
        mRemoteAnimationProvider = animProvider;
        super.registerAndStartActivity(intent, animProvider, context, handler, duration);
    }
}
+7 −4
Original line number Diff line number Diff line
@@ -285,7 +285,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
        long statusBarTransitionDelay = duration - STATUS_BAR_TRANSITION_DURATION
                - STATUS_BAR_TRANSITION_PRE_DELAY;
        RemoteAnimationAdapterCompat adapterCompat =
                new RemoteAnimationAdapterCompat(runner, duration, statusBarTransitionDelay);
                new RemoteAnimationAdapterCompat(runner, duration, statusBarTransitionDelay,
                        mLauncher.getIApplicationThread());
        return new ActivityOptionsWrapper(
                ActivityOptionsCompat.makeRemoteAnimation(adapterCompat), onEndCallback);
    }
@@ -1081,7 +1082,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
                    new RemoteAnimationAdapterCompat(
                            new LauncherAnimationRunner(mHandler, mWallpaperOpenRunner,
                                    false /* startAtFrontOfQueue */),
                            CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
                            CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */,
                            mLauncher.getIApplicationThread()));

            if (KEYGUARD_ANIMATION.get()) {
                mKeyguardGoingAwayRunner = createWallpaperOpenRunner(true /* fromUnlock */);
@@ -1091,7 +1093,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
                                new LauncherAnimationRunner(
                                        mHandler, mKeyguardGoingAwayRunner,
                                        true /* startAtFrontOfQueue */),
                                CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
                                CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */,
                                mLauncher.getIApplicationThread()));
            }

            new ActivityCompat(mLauncher).registerRemoteAnimations(definition);
@@ -1109,7 +1112,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
            mWallpaperOpenTransitionRunner = createWallpaperOpenRunner(false /* fromUnlock */);
            mLauncherOpenTransition = RemoteAnimationAdapterCompat.buildRemoteTransition(
                    new LauncherAnimationRunner(mHandler, mWallpaperOpenTransitionRunner,
                            false /* startAtFrontOfQueue */));
                            false /* startAtFrontOfQueue */), mLauncher.getIApplicationThread());
            mLauncherOpenTransition.addHomeOpenCheck(mLauncher.getComponentName());
            SystemUiProxy.INSTANCE.getNoCreate().registerRemoteTransition(mLauncherOpenTransition);
        }
+3 −2
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
        RemoteAnimationAdapterCompat adapterCompat = new RemoteAnimationAdapterCompat(
                wrapper, RECENTS_LAUNCH_DURATION,
                RECENTS_LAUNCH_DURATION - STATUS_BAR_TRANSITION_DURATION
                        - STATUS_BAR_TRANSITION_PRE_DELAY);
                        - STATUS_BAR_TRANSITION_PRE_DELAY, getIApplicationThread());
        final ActivityOptionsWrapper activityOptions = new ActivityOptionsWrapper(
                ActivityOptionsCompat.makeRemoteAnimation(adapterCompat),
                onEndCallback);
@@ -394,7 +394,8 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
        LauncherAnimationRunner runner = new LauncherAnimationRunner(
                getMainThreadHandler(), mAnimationToHomeFactory, true);
        RemoteAnimationAdapterCompat adapterCompat =
                new RemoteAnimationAdapterCompat(runner, HOME_APPEAR_DURATION, 0);
                new RemoteAnimationAdapterCompat(runner, HOME_APPEAR_DURATION, 0,
                        getIApplicationThread());
        startActivity(createHomeIntent(),
                ActivityOptionsCompat.makeRemoteAnimation(adapterCompat).toBundle());
    }
+2 −1
Original line number Diff line number Diff line
@@ -178,7 +178,8 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn

        if (ENABLE_SHELL_TRANSITIONS) {
            RemoteTransitionCompat transition = new RemoteTransitionCompat(mCallbacks,
                    mController != null ? mController.getController() : null);
                    mController != null ? mController.getController() : null,
                    mCtx.getIApplicationThread());
            Bundle options = ActivityOptionsCompat.makeRemoteTransition(transition)
                    .setTransientLaunch().toBundle();
            mCtx.startActivity(intent, options);
+0 −18
Original line number Diff line number Diff line
@@ -15,11 +15,6 @@
 */
package com.android.quickstep.util;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import com.android.launcher3.BaseActivity;
import com.android.launcher3.util.ActivityTracker;
import com.android.launcher3.util.ActivityTracker.SchedulerCallback;
@@ -75,17 +70,4 @@ public class ActivityInitListener<T extends BaseActivity> implements
        mIsRegistered = false;
        mOnInitListener = null;
    }

    /**
     * Starts the given intent with the provided animation. Unlike {@link #register(Intent)}, this
     * method will not call {@link #init} if the activity already exists, it will only call it when
     * we get handleIntent() for the provided intent that we're starting.
     */
    public void registerAndStartActivity(Intent intent, RemoteAnimationProvider animProvider,
            Context context, Handler handler, long duration) {
        register();

        Bundle options = animProvider.toActivityOptions(handler, duration, context).toBundle();
        context.startActivity(new Intent(intent), options);
    }
}
Loading