Playing wallpaper animation if Launcher is destroyed

Bug: 140539007
Change-Id: I6573eafda353f4f399768613ef068de86c8f37f4
This commit is contained in:
Sunny Goyal
2019-09-20 09:51:18 -07:00
parent 151fddfb71
commit eb71cef629

View File

@@ -57,6 +57,9 @@ import android.os.Looper;
import android.util.Pair;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.anim.Interpolators;
@@ -80,9 +83,6 @@ import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat;
import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat.SurfaceParams;
import com.android.systemui.shared.system.WindowManagerWrapper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/**
* {@link LauncherAppTransitionManager} with Quickstep-specific app transitions for launching from
* home and/or all-apps.
@@ -766,6 +766,13 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
@Override
public void onCreateAnimation(RemoteAnimationTargetCompat[] targetCompats,
LauncherAnimationRunner.AnimationResult result) {
if (mLauncher.isDestroyed()) {
AnimatorSet anim = new AnimatorSet();
anim.play(getClosingWindowAnimators(targetCompats));
result.setAnimation(anim, mLauncher.getApplicationContext());
return;
}
if (!mLauncher.hasBeenResumed()) {
// If launcher is not resumed, wait until new async-frame after resume
mLauncher.addOnResumeCallback(() ->