Loading quickstep/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -43,4 +43,9 @@ <!-- Accessibility actions --> <item type="id" name="action_move_to_top_or_left" /> <item type="id" name="action_move_to_bottom_or_right" /> <!-- The max scale for the wallpaper when it's zoomed in --> <item name="config_wallpaperMaxScale" format="float" type="dimen"> @*android:dimen/config_wallpaperMaxScale </item> </resources> quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +6 −5 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_SCRIM_FOR_APP_LAU import static com.android.launcher3.config.FeatureFlags.KEYGUARD_ANIMATION; import static com.android.launcher3.config.FeatureFlags.SEPARATE_RECENTS_ACTIVITY; import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID; import static com.android.launcher3.statehandlers.DepthController.DEPTH; import static com.android.launcher3.statehandlers.DepthController.STATE_DEPTH; import static com.android.launcher3.util.window.RefreshRateTracker.getSingleFrameMs; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; import static com.android.launcher3.views.FloatingIconView.getFloatingIconView; Loading Loading @@ -384,7 +384,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener @Override public void onAnimationStart(Animator animation) { mLauncher.addOnResumeCallback(() -> ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH, ObjectAnimator.ofFloat(mLauncher.getDepthController(), STATE_DEPTH, mLauncher.getStateManager().getState().getDepth( mLauncher)).start()); } Loading @@ -408,7 +408,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener @Override public void onAnimationStart(Animator animation) { mLauncher.addOnResumeCallback(() -> ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH, ObjectAnimator.ofFloat(mLauncher.getDepthController(), STATE_DEPTH, mLauncher.getStateManager().getState().getDepth( mLauncher)).start()); } Loading Loading @@ -1051,7 +1051,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener && BlurUtils.supportsBlursOnWindows(); MyDepthController depthController = new MyDepthController(mLauncher); ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController, DEPTH, ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController, STATE_DEPTH, BACKGROUND_APP.getDepth(mLauncher)) .setDuration(APP_LAUNCH_DURATION); Loading Loading @@ -1594,7 +1594,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener true /* animateOverviewScrim */, launcherView).getAnimators()); if (!areAllTargetsTranslucent(appTargets)) { anim.play(ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH, anim.play(ObjectAnimator.ofFloat(mLauncher.getDepthController(), STATE_DEPTH, BACKGROUND_APP.getDepth(mLauncher), NORMAL.getDepth(mLauncher))); } Loading quickstep/src/com/android/launcher3/statehandlers/DepthController.java +3 −2 Original line number Diff line number Diff line Loading @@ -165,7 +165,8 @@ public class DepthController extends BaseDepthController implements StateHandler float toDepth = toState.getDepth(mLauncher); if (Float.compare(mDepth, toDepth) != 0) { animation.setFloat(this, DEPTH, toDepth, config.getInterpolator(ANIM_DEPTH, LINEAR)); animation.setFloat(this, STATE_DEPTH, toDepth, config.getInterpolator(ANIM_DEPTH, LINEAR)); } } Loading @@ -179,7 +180,7 @@ public class DepthController extends BaseDepthController implements StateHandler public void onMultiWindowModeChanged(boolean isInMultiWindowMode) { mIgnoreStateChangesDuringMultiWindowAnimation = true; ObjectAnimator mwAnimation = ObjectAnimator.ofFloat(this, DEPTH, ObjectAnimator mwAnimation = ObjectAnimator.ofFloat(this, STATE_DEPTH, mLauncher.getStateManager().getState().getDepth(mLauncher, isInMultiWindowMode)) .setDuration(300); mwAnimation.addListener(new AnimatorListenerAdapter() { Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +9 −0 Original line number Diff line number Diff line Loading @@ -27,9 +27,11 @@ import static com.android.launcher3.LauncherState.NO_OFFSET; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK; import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT; import static com.android.launcher3.anim.Interpolators.EMPHASIZED; import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.config.FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE; import static com.android.launcher3.config.FeatureFlags.ENABLE_WIDGET_PICKER_DEPTH; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP; import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID; import static com.android.launcher3.popup.QuickstepSystemShortcut.getSplitSelectShortcutByPosition; Loading @@ -44,6 +46,7 @@ import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN; import static com.android.launcher3.util.DisplayController.CHANGE_NAVIGATION_MODE; import static com.android.launcher3.util.Executors.THREAD_POOL_EXECUTOR; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import static com.android.quickstep.util.BaseDepthController.WIDGET_DEPTH; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY; import android.animation.AnimatorSet; Loading Loading @@ -75,6 +78,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.QuickstepAccessibilityDelegate; import com.android.launcher3.QuickstepTransitionManager; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.Workspace; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.anim.AnimatorPlaybackController; Loading Loading @@ -583,6 +587,11 @@ public class QuickstepLauncher extends Launcher { public void onWidgetsTransition(float progress) { super.onWidgetsTransition(progress); onTaskbarInAppDisplayProgressUpdate(progress, WIDGETS_PAGE_PROGRESS_INDEX); if (ENABLE_WIDGET_PICKER_DEPTH.get() && !Utilities.IS_RUNNING_IN_TEST_HARNESS) { WIDGET_DEPTH.set(getDepthController(), Utilities.mapToRange(progress, 0f, 1f, 0f, getDeviceProfile().bottomSheetDepth, EMPHASIZED)); } } private void onTaskbarInAppDisplayProgressUpdate(float progress, int flag) { Loading quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +4 −14 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.launcher3.uioverrides.states; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_ALLAPPS; import android.content.Context; Loading @@ -26,7 +25,6 @@ import com.android.launcher3.DeviceProfile.DeviceProfileListenable; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.util.Themes; /** Loading @@ -44,9 +42,9 @@ public class AllAppsState extends LauncherState { @Override public <DEVICE_PROFILE_CONTEXT extends Context & DeviceProfileListenable> int getTransitionDuration(DEVICE_PROFILE_CONTEXT context, boolean isToState) { return context.getDeviceProfile().isTablet ? 500 : isToState ? 600 : 300; return isToState ? context.getDeviceProfile().allAppsOpenDuration : context.getDeviceProfile().allAppsCloseDuration; } @Override Loading Loading @@ -83,15 +81,7 @@ public class AllAppsState extends LauncherState { protected <DEVICE_PROFILE_CONTEXT extends Context & DeviceProfile.DeviceProfileListenable> float getDepthUnchecked(DEVICE_PROFILE_CONTEXT context) { if (context.getDeviceProfile().isTablet) { // The goal is to set wallpaper to zoom at workspaceContentScale when in AllApps. // When depth is 0, wallpaper zoom is set to maxWallpaperScale. // When depth is 1, wallpaper zoom is set to 1. // For depth to achieve zoom set to maxWallpaperScale * workspaceContentScale: float maxWallpaperScale = context.getResources().getFloat( com.android.internal.R.dimen.config_wallpaperMaxScale); return Utilities.mapToRange( maxWallpaperScale * context.getDeviceProfile().workspaceContentScale, maxWallpaperScale, 1f, 0f, 1f, LINEAR); return context.getDeviceProfile().bottomSheetDepth; } else { // The scrim fades in at approximately 50% of the swipe gesture. // This means that the depth should be greater than 1, in order to fully zoom out. Loading Loading
quickstep/res/values/config.xml +5 −0 Original line number Diff line number Diff line Loading @@ -43,4 +43,9 @@ <!-- Accessibility actions --> <item type="id" name="action_move_to_top_or_left" /> <item type="id" name="action_move_to_bottom_or_right" /> <!-- The max scale for the wallpaper when it's zoomed in --> <item name="config_wallpaperMaxScale" format="float" type="dimen"> @*android:dimen/config_wallpaperMaxScale </item> </resources>
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +6 −5 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_SCRIM_FOR_APP_LAU import static com.android.launcher3.config.FeatureFlags.KEYGUARD_ANIMATION; import static com.android.launcher3.config.FeatureFlags.SEPARATE_RECENTS_ACTIVITY; import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID; import static com.android.launcher3.statehandlers.DepthController.DEPTH; import static com.android.launcher3.statehandlers.DepthController.STATE_DEPTH; import static com.android.launcher3.util.window.RefreshRateTracker.getSingleFrameMs; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; import static com.android.launcher3.views.FloatingIconView.getFloatingIconView; Loading Loading @@ -384,7 +384,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener @Override public void onAnimationStart(Animator animation) { mLauncher.addOnResumeCallback(() -> ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH, ObjectAnimator.ofFloat(mLauncher.getDepthController(), STATE_DEPTH, mLauncher.getStateManager().getState().getDepth( mLauncher)).start()); } Loading @@ -408,7 +408,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener @Override public void onAnimationStart(Animator animation) { mLauncher.addOnResumeCallback(() -> ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH, ObjectAnimator.ofFloat(mLauncher.getDepthController(), STATE_DEPTH, mLauncher.getStateManager().getState().getDepth( mLauncher)).start()); } Loading Loading @@ -1051,7 +1051,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener && BlurUtils.supportsBlursOnWindows(); MyDepthController depthController = new MyDepthController(mLauncher); ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController, DEPTH, ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController, STATE_DEPTH, BACKGROUND_APP.getDepth(mLauncher)) .setDuration(APP_LAUNCH_DURATION); Loading Loading @@ -1594,7 +1594,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener true /* animateOverviewScrim */, launcherView).getAnimators()); if (!areAllTargetsTranslucent(appTargets)) { anim.play(ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH, anim.play(ObjectAnimator.ofFloat(mLauncher.getDepthController(), STATE_DEPTH, BACKGROUND_APP.getDepth(mLauncher), NORMAL.getDepth(mLauncher))); } Loading
quickstep/src/com/android/launcher3/statehandlers/DepthController.java +3 −2 Original line number Diff line number Diff line Loading @@ -165,7 +165,8 @@ public class DepthController extends BaseDepthController implements StateHandler float toDepth = toState.getDepth(mLauncher); if (Float.compare(mDepth, toDepth) != 0) { animation.setFloat(this, DEPTH, toDepth, config.getInterpolator(ANIM_DEPTH, LINEAR)); animation.setFloat(this, STATE_DEPTH, toDepth, config.getInterpolator(ANIM_DEPTH, LINEAR)); } } Loading @@ -179,7 +180,7 @@ public class DepthController extends BaseDepthController implements StateHandler public void onMultiWindowModeChanged(boolean isInMultiWindowMode) { mIgnoreStateChangesDuringMultiWindowAnimation = true; ObjectAnimator mwAnimation = ObjectAnimator.ofFloat(this, DEPTH, ObjectAnimator mwAnimation = ObjectAnimator.ofFloat(this, STATE_DEPTH, mLauncher.getStateManager().getState().getDepth(mLauncher, isInMultiWindowMode)) .setDuration(300); mwAnimation.addListener(new AnimatorListenerAdapter() { Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +9 −0 Original line number Diff line number Diff line Loading @@ -27,9 +27,11 @@ import static com.android.launcher3.LauncherState.NO_OFFSET; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK; import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT; import static com.android.launcher3.anim.Interpolators.EMPHASIZED; import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.config.FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE; import static com.android.launcher3.config.FeatureFlags.ENABLE_WIDGET_PICKER_DEPTH; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP; import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID; import static com.android.launcher3.popup.QuickstepSystemShortcut.getSplitSelectShortcutByPosition; Loading @@ -44,6 +46,7 @@ import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN; import static com.android.launcher3.util.DisplayController.CHANGE_NAVIGATION_MODE; import static com.android.launcher3.util.Executors.THREAD_POOL_EXECUTOR; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import static com.android.quickstep.util.BaseDepthController.WIDGET_DEPTH; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY; import android.animation.AnimatorSet; Loading Loading @@ -75,6 +78,7 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.QuickstepAccessibilityDelegate; import com.android.launcher3.QuickstepTransitionManager; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.Workspace; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.anim.AnimatorPlaybackController; Loading Loading @@ -583,6 +587,11 @@ public class QuickstepLauncher extends Launcher { public void onWidgetsTransition(float progress) { super.onWidgetsTransition(progress); onTaskbarInAppDisplayProgressUpdate(progress, WIDGETS_PAGE_PROGRESS_INDEX); if (ENABLE_WIDGET_PICKER_DEPTH.get() && !Utilities.IS_RUNNING_IN_TEST_HARNESS) { WIDGET_DEPTH.set(getDepthController(), Utilities.mapToRange(progress, 0f, 1f, 0f, getDeviceProfile().bottomSheetDepth, EMPHASIZED)); } } private void onTaskbarInAppDisplayProgressUpdate(float progress, int flag) { Loading
quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +4 −14 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.launcher3.uioverrides.states; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_ALLAPPS; import android.content.Context; Loading @@ -26,7 +25,6 @@ import com.android.launcher3.DeviceProfile.DeviceProfileListenable; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.util.Themes; /** Loading @@ -44,9 +42,9 @@ public class AllAppsState extends LauncherState { @Override public <DEVICE_PROFILE_CONTEXT extends Context & DeviceProfileListenable> int getTransitionDuration(DEVICE_PROFILE_CONTEXT context, boolean isToState) { return context.getDeviceProfile().isTablet ? 500 : isToState ? 600 : 300; return isToState ? context.getDeviceProfile().allAppsOpenDuration : context.getDeviceProfile().allAppsCloseDuration; } @Override Loading Loading @@ -83,15 +81,7 @@ public class AllAppsState extends LauncherState { protected <DEVICE_PROFILE_CONTEXT extends Context & DeviceProfile.DeviceProfileListenable> float getDepthUnchecked(DEVICE_PROFILE_CONTEXT context) { if (context.getDeviceProfile().isTablet) { // The goal is to set wallpaper to zoom at workspaceContentScale when in AllApps. // When depth is 0, wallpaper zoom is set to maxWallpaperScale. // When depth is 1, wallpaper zoom is set to 1. // For depth to achieve zoom set to maxWallpaperScale * workspaceContentScale: float maxWallpaperScale = context.getResources().getFloat( com.android.internal.R.dimen.config_wallpaperMaxScale); return Utilities.mapToRange( maxWallpaperScale * context.getDeviceProfile().workspaceContentScale, maxWallpaperScale, 1f, 0f, 1f, LINEAR); return context.getDeviceProfile().bottomSheetDepth; } else { // The scrim fades in at approximately 50% of the swipe gesture. // This means that the depth should be greater than 1, in order to fully zoom out. Loading