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

Commit 8a114433 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Removing unnecessary RemoteAnimationTargetCompat

Merged-In: I12a4c29eaf9bd7d97d3c02074b4cc1ca452fc88a
Bug: 221961069
Test: Presubmit
Change-Id: I12a4c29eaf9bd7d97d3c02074b4cc1ca452fc88a
parent 8a40f055
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -28,13 +28,13 @@ import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.view.RemoteAnimationTarget;

import androidx.annotation.BinderThread;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;

import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;

import java.lang.ref.WeakReference;

@@ -82,9 +82,9 @@ public class LauncherAnimationRunner implements RemoteAnimationRunnerCompat {
    @BinderThread
    public void onAnimationStart(
            int transit,
            RemoteAnimationTargetCompat[] appTargets,
            RemoteAnimationTargetCompat[] wallpaperTargets,
            RemoteAnimationTargetCompat[] nonAppTargets,
            RemoteAnimationTarget[] appTargets,
            RemoteAnimationTarget[] wallpaperTargets,
            RemoteAnimationTarget[] nonAppTargets,
            Runnable runnable) {
        Runnable r = () -> {
            finishExistingAnimation();
@@ -101,17 +101,17 @@ public class LauncherAnimationRunner implements RemoteAnimationRunnerCompat {

    // Called only in R platform
    @BinderThread
    public void onAnimationStart(RemoteAnimationTargetCompat[] appTargets,
            RemoteAnimationTargetCompat[] wallpaperTargets, Runnable runnable) {
    public void onAnimationStart(RemoteAnimationTarget[] appTargets,
            RemoteAnimationTarget[] wallpaperTargets, Runnable runnable) {
        onAnimationStart(0 /* transit */, appTargets, wallpaperTargets,
                new RemoteAnimationTargetCompat[0], runnable);
                new RemoteAnimationTarget[0], runnable);
    }

    // Called only in Q platform
    @BinderThread
    @Deprecated
    public void onAnimationStart(RemoteAnimationTargetCompat[] appTargets, Runnable runnable) {
        onAnimationStart(appTargets, new RemoteAnimationTargetCompat[0], runnable);
    public void onAnimationStart(RemoteAnimationTarget[] appTargets, Runnable runnable) {
        onAnimationStart(appTargets, new RemoteAnimationTarget[0], runnable);
    }


@@ -229,9 +229,9 @@ public class LauncherAnimationRunner implements RemoteAnimationRunnerCompat {
         * call {@link AnimationResult#setAnimation} with the target animation to be run.
         */
        void onCreateAnimation(int transit,
                RemoteAnimationTargetCompat[] appTargets,
                RemoteAnimationTargetCompat[] wallpaperTargets,
                RemoteAnimationTargetCompat[] nonAppTargets,
                RemoteAnimationTarget[] appTargets,
                RemoteAnimationTarget[] wallpaperTargets,
                RemoteAnimationTarget[] nonAppTargets,
                LauncherAnimationRunner.AnimationResult result);

        /**
+3 −3
Original line number Diff line number Diff line
@@ -19,11 +19,11 @@ import android.animation.AnimatorSet;
import android.annotation.TargetApi;
import android.os.Build;
import android.os.CancellationSignal;
import android.view.RemoteAnimationTarget;

import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;

import java.util.function.BiPredicate;

@@ -52,8 +52,8 @@ public class LauncherInitListener extends ActivityInitListener<Launcher> {
            CancellationSignal cancellationSignal = new CancellationSignal();
            appTransitionManager.setRemoteAnimationProvider(new RemoteAnimationProvider() {
                @Override
                public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets,
                        RemoteAnimationTargetCompat[] wallpaperTargets) {
                public AnimatorSet createWindowAnimation(RemoteAnimationTarget[] appTargets,
                        RemoteAnimationTarget[] wallpaperTargets) {

                    // On the first call clear the reference.
                    cancellationSignal.cancel();
+57 −57

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import android.os.IBinder;
import android.os.SystemProperties;
import android.view.Display;
import android.view.HapticFeedbackConstants;
import android.view.RemoteAnimationTarget;
import android.view.View;
import android.view.WindowManagerGlobal;
import android.window.SplashScreen;
@@ -139,7 +140,6 @@ import com.android.quickstep.views.OverviewActionsView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.unfold.UnfoldSharedComponent;
import com.android.systemui.unfold.UnfoldTransitionFactory;
import com.android.systemui.unfold.UnfoldTransitionProgressProvider;
@@ -761,8 +761,8 @@ public class QuickstepLauncher extends Launcher {
        QuickstepTransitionManager appTransitionManager = getAppTransitionManager();
        appTransitionManager.setRemoteAnimationProvider(new RemoteAnimationProvider() {
            @Override
            public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets,
                    RemoteAnimationTargetCompat[] wallpaperTargets) {
            public AnimatorSet createWindowAnimation(RemoteAnimationTarget[] appTargets,
                    RemoteAnimationTarget[] wallpaperTargets) {

                // On the first call clear the reference.
                signal.cancel();
+15 −15

File changed.

Preview size limit exceeded, changes collapsed.

Loading