summaryrefslogtreecommitdiffstats
path: root/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-06-03 07:26:36 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-06-03 07:26:36 +0000
commit73859d052104d841fdb8560e49d8a46c5bff93b1 (patch)
tree58cf13d9da0fde15896d03148bfece106ad78f61 /quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
parentdf0843e569b93e77355990f7a71fe39746b43493 (diff)
parentbf29023212a107481b6cbf3dbe4fda52c6f50180 (diff)
downloadandroid_packages_apps_Trebuchet-73859d052104d841fdb8560e49d8a46c5bff93b1.tar.gz
android_packages_apps_Trebuchet-73859d052104d841fdb8560e49d8a46c5bff93b1.tar.bz2
android_packages_apps_Trebuchet-73859d052104d841fdb8560e49d8a46c5bff93b1.zip
Snap for 4818534 from bf29023212a107481b6cbf3dbe4fda52c6f50180 to pi-releaselineage-16.0_20181101
Change-Id: I06c92e93af46c5f35d997815ed1392cca2f05c46
Diffstat (limited to 'quickstep/src/com/android/launcher3/uioverrides/UiFactory.java')
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index d0c7b2117..dd5dcbeaf 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -25,14 +25,19 @@ import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN;
+import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
+import android.animation.AnimatorSet;
+import android.animation.ValueAnimator;
import android.app.Activity;
import android.content.Context;
+import android.os.CancellationSignal;
import android.util.Base64;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherAppTransitionManagerImpl;
import com.android.launcher3.LauncherState;
import com.android.launcher3.LauncherStateManager;
import com.android.launcher3.LauncherStateManager.StateHandler;
@@ -41,6 +46,8 @@ import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.util.TouchController;
import com.android.quickstep.OverviewInteractionState;
import com.android.quickstep.RecentsModel;
+import com.android.quickstep.util.RemoteAnimationTargetSet;
+import com.android.quickstep.util.RemoteFadeOutAnimationListener;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.ActivityCompat;
import com.android.systemui.shared.system.WindowManagerWrapper;
@@ -179,6 +186,23 @@ public class UiFactory {
}
}
+ public static void useFadeOutAnimationForLauncherStart(Launcher launcher,
+ CancellationSignal cancellationSignal) {
+ LauncherAppTransitionManagerImpl appTransitionManager =
+ (LauncherAppTransitionManagerImpl) launcher.getAppTransitionManager();
+ appTransitionManager.setRemoteAnimationProvider((targets) -> {
+
+ // On the first call clear the reference.
+ cancellationSignal.cancel();
+
+ ValueAnimator fadeAnimation = ValueAnimator.ofFloat(1, 0);
+ fadeAnimation.addUpdateListener(new RemoteFadeOutAnimationListener(targets));
+ AnimatorSet anim = new AnimatorSet();
+ anim.play(fadeAnimation);
+ return anim;
+ }, cancellationSignal);
+ }
+
public static boolean dumpActivity(Activity activity, PrintWriter writer) {
if (!Utilities.IS_DEBUG_DEVICE) {
return false;