Merge "Allow QuickstepTransitionManager to be overridden" into tm-qpr-dev am: bc333343ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20785348 Change-Id: Ia2631b7fb6c44cd870bf5c7c0b8684c76f41f4ab Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -213,9 +213,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
|||||||
private static final int WIDGET_CROSSFADE_DURATION_MILLIS = 125;
|
private static final int WIDGET_CROSSFADE_DURATION_MILLIS = 125;
|
||||||
|
|
||||||
protected final QuickstepLauncher mLauncher;
|
protected final QuickstepLauncher mLauncher;
|
||||||
private final DragLayer mDragLayer;
|
protected final DragLayer mDragLayer;
|
||||||
|
|
||||||
final Handler mHandler;
|
protected final Handler mHandler;
|
||||||
|
|
||||||
private final float mClosingWindowTransY;
|
private final float mClosingWindowTransY;
|
||||||
private final float mMaxShadowRadius;
|
private final float mMaxShadowRadius;
|
||||||
@@ -1097,31 +1097,37 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hasControlRemoteAppTransitionPermission()) {
|
if (hasControlRemoteAppTransitionPermission()) {
|
||||||
mWallpaperOpenRunner = createWallpaperOpenRunner(false /* fromUnlock */);
|
|
||||||
|
|
||||||
RemoteAnimationDefinition definition = new RemoteAnimationDefinition();
|
RemoteAnimationDefinition definition = new RemoteAnimationDefinition();
|
||||||
definition.addRemoteAnimation(WindowManager.TRANSIT_OLD_WALLPAPER_OPEN,
|
addRemoteAnimations(definition);
|
||||||
WindowConfiguration.ACTIVITY_TYPE_STANDARD,
|
|
||||||
new RemoteAnimationAdapter(
|
|
||||||
new LauncherAnimationRunner(mHandler, mWallpaperOpenRunner,
|
|
||||||
false /* startAtFrontOfQueue */),
|
|
||||||
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
|
|
||||||
|
|
||||||
if (KEYGUARD_ANIMATION.get()) {
|
|
||||||
mKeyguardGoingAwayRunner = createWallpaperOpenRunner(true /* fromUnlock */);
|
|
||||||
definition.addRemoteAnimation(
|
|
||||||
WindowManager.TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER,
|
|
||||||
new RemoteAnimationAdapter(
|
|
||||||
new LauncherAnimationRunner(
|
|
||||||
mHandler, mKeyguardGoingAwayRunner,
|
|
||||||
true /* startAtFrontOfQueue */),
|
|
||||||
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
|
|
||||||
}
|
|
||||||
|
|
||||||
mLauncher.registerRemoteAnimations(definition);
|
mLauncher.registerRemoteAnimations(definition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds remote animations to a {@link RemoteAnimationDefinition}. May be overridden to add
|
||||||
|
* additional animations.
|
||||||
|
*/
|
||||||
|
protected void addRemoteAnimations(RemoteAnimationDefinition definition) {
|
||||||
|
mWallpaperOpenRunner = createWallpaperOpenRunner(false /* fromUnlock */);
|
||||||
|
definition.addRemoteAnimation(WindowManager.TRANSIT_OLD_WALLPAPER_OPEN,
|
||||||
|
WindowConfiguration.ACTIVITY_TYPE_STANDARD,
|
||||||
|
new RemoteAnimationAdapter(
|
||||||
|
new LauncherAnimationRunner(mHandler, mWallpaperOpenRunner,
|
||||||
|
false /* startAtFrontOfQueue */),
|
||||||
|
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
|
||||||
|
|
||||||
|
if (KEYGUARD_ANIMATION.get()) {
|
||||||
|
mKeyguardGoingAwayRunner = createWallpaperOpenRunner(true /* fromUnlock */);
|
||||||
|
definition.addRemoteAnimation(
|
||||||
|
WindowManager.TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER,
|
||||||
|
new RemoteAnimationAdapter(
|
||||||
|
new LauncherAnimationRunner(
|
||||||
|
mHandler, mKeyguardGoingAwayRunner,
|
||||||
|
true /* startAtFrontOfQueue */),
|
||||||
|
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers remote animations used when closing apps to home screen.
|
* Registers remote animations used when closing apps to home screen.
|
||||||
*/
|
*/
|
||||||
@@ -1163,7 +1169,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
|||||||
SystemUiProxy.INSTANCE.get(mLauncher).setStartingWindowListener(null);
|
SystemUiProxy.INSTANCE.get(mLauncher).setStartingWindowListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void unregisterRemoteAnimations() {
|
protected void unregisterRemoteAnimations() {
|
||||||
if (SEPARATE_RECENTS_ACTIVITY.get()) {
|
if (SEPARATE_RECENTS_ACTIVITY.get()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ public class QuickstepLauncher extends Launcher {
|
|||||||
mActionsView.updateDimension(getDeviceProfile(), overviewPanel.getLastComputedTaskSize());
|
mActionsView.updateDimension(getDeviceProfile(), overviewPanel.getLastComputedTaskSize());
|
||||||
mActionsView.updateVerticalMargin(DisplayController.getNavigationMode(this));
|
mActionsView.updateVerticalMargin(DisplayController.getNavigationMode(this));
|
||||||
|
|
||||||
mAppTransitionManager = new QuickstepTransitionManager(this);
|
mAppTransitionManager = buildAppTransitionManager();
|
||||||
mAppTransitionManager.registerRemoteAnimations();
|
mAppTransitionManager.registerRemoteAnimations();
|
||||||
mAppTransitionManager.registerRemoteTransitions();
|
mAppTransitionManager.registerRemoteTransitions();
|
||||||
|
|
||||||
@@ -308,6 +308,13 @@ public class QuickstepLauncher extends Launcher {
|
|||||||
return mHotseatPredictionController;
|
return mHotseatPredictionController;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the {@link QuickstepTransitionManager} instance to use for managing transitions.
|
||||||
|
*/
|
||||||
|
protected QuickstepTransitionManager buildAppTransitionManager() {
|
||||||
|
return new QuickstepTransitionManager(this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected QuickstepOnboardingPrefs createOnboardingPrefs(SharedPreferences sharedPrefs) {
|
protected QuickstepOnboardingPrefs createOnboardingPrefs(SharedPreferences sharedPrefs) {
|
||||||
return new QuickstepOnboardingPrefs(this, sharedPrefs);
|
return new QuickstepOnboardingPrefs(this, sharedPrefs);
|
||||||
|
|||||||
@@ -379,6 +379,10 @@ public final class FeatureFlags {
|
|||||||
"Enable the ability to generate monochromatic icons, if it is not provided by the app"
|
"Enable the ability to generate monochromatic icons, if it is not provided by the app"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static final BooleanFlag ENABLE_DREAM_TRANSITION = getDebugFlag(
|
||||||
|
"ENABLE_DREAM_TRANSITION", true,
|
||||||
|
"Enable the launcher transition when the device enters a dream");
|
||||||
|
|
||||||
public static final BooleanFlag ENABLE_TASKBAR_EDU_TOOLTIP = getDebugFlag(
|
public static final BooleanFlag ENABLE_TASKBAR_EDU_TOOLTIP = getDebugFlag(
|
||||||
"ENABLE_TASKBAR_EDU_TOOLTIP", true,
|
"ENABLE_TASKBAR_EDU_TOOLTIP", true,
|
||||||
"Enable the tooltip version of the Taskbar education flow.");
|
"Enable the tooltip version of the Taskbar education flow.");
|
||||||
|
|||||||
Reference in New Issue
Block a user