Merging from ub-launcher3-master @ build 6834159
Test: manual, presubmit on the source branch x20/teams/android-launcher/merge/ub-launcher3-master_master_6834159.html Change-Id: I4350d0ddedd107d7005625480aefda19e5d06ba2
This commit is contained in:
commit
fcc7dd7e57
51 files changed
+1238
-249
No files matched your search
@@ -57,6 +57,7 @@ import android.graphics.drawable.Drawable;
|
||||
import android.os.CancellationSignal;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Trace;
|
||||
import android.util.Pair;
|
||||
import android.view.View;
|
||||
|
||||
@@ -137,6 +138,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
|
||||
// Progress = 0: All apps is fully pulled up, Progress = 1: All apps is fully pulled down.
|
||||
public static final float ALL_APPS_PROGRESS_OFF_SCREEN = 1.3059858f;
|
||||
public static final String TRANSITION_OPEN_LAUNCHER = "transition:OpenLauncher";
|
||||
|
||||
protected final BaseQuickstepLauncher mLauncher;
|
||||
|
||||
@@ -857,6 +859,21 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
// is initialized.
|
||||
if (launcherIsATargetWithMode(appTargets, MODE_OPENING)
|
||||
|| mLauncher.isForceInvisible()) {
|
||||
if (Trace.isEnabled()) {
|
||||
anim.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
Trace.beginAsyncSection(TRANSITION_OPEN_LAUNCHER, 0);
|
||||
super.onAnimationStart(animation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
Trace.endAsyncSection(TRANSITION_OPEN_LAUNCHER, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
// Only register the content animation for cancellation when state changes
|
||||
mLauncher.getStateManager().setCurrentAnimation(anim);
|
||||
|
||||
@@ -891,6 +908,9 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
*/
|
||||
private class AppLaunchAnimationRunner implements WrappedAnimationRunnerImpl {
|
||||
|
||||
private static final String TRANSITION_LAUNCH_FROM_RECENTS = "transition:LaunchFromRecents";
|
||||
private static final String TRANSITION_LAUNCH_FROM_ICON = "transition:LaunchFromIcon";
|
||||
|
||||
private final Handler mHandler;
|
||||
private final View mV;
|
||||
|
||||
@@ -913,7 +933,8 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
boolean launcherClosing =
|
||||
launcherIsATargetWithMode(appTargets, MODE_CLOSING);
|
||||
|
||||
if (isLaunchingFromRecents(mV, appTargets)) {
|
||||
final boolean launchingFromRecents = isLaunchingFromRecents(mV, appTargets);
|
||||
if (launchingFromRecents) {
|
||||
composeRecentsLaunchAnimator(anim, mV, appTargets, wallpaperTargets,
|
||||
launcherClosing);
|
||||
} else {
|
||||
@@ -921,6 +942,26 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
launcherClosing);
|
||||
}
|
||||
|
||||
if (Trace.isEnabled()) {
|
||||
final String section =
|
||||
launchingFromRecents
|
||||
? TRANSITION_LAUNCH_FROM_RECENTS : TRANSITION_LAUNCH_FROM_ICON;
|
||||
|
||||
anim.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
Trace.beginAsyncSection(section, 0);
|
||||
super.onAnimationStart(animation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
super.onAnimationEnd(animation);
|
||||
Trace.endAsyncSection(section, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (launcherClosing) {
|
||||
anim.addListener(mForceInvisibleListener);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user