mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Add wallpaper zoom to areas that have blur
Whenever blurring, the wallpaper should also zoom out. This is the mental model of our Depth System. Test: manual Bug: 149792636 Change-Id: I1783eb87fefeb6f917f0ba64f2c6ec8f1f2004fa
This commit is contained in:
@@ -33,7 +33,7 @@ import static com.android.launcher3.anim.Interpolators.EXAGGERATED_EASE;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.config.FeatureFlags.KEYGUARD_ANIMATION;
|
||||
import static com.android.launcher3.dragndrop.DragLayer.ALPHA_INDEX_TRANSITIONS;
|
||||
import static com.android.launcher3.uioverrides.BackgroundBlurController.BACKGROUND_BLUR;
|
||||
import static com.android.launcher3.uioverrides.DepthController.DEPTH;
|
||||
import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION;
|
||||
import static com.android.quickstep.TaskUtils.taskIsATargetWithMode;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius;
|
||||
@@ -73,7 +73,7 @@ import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.dragndrop.DragLayer;
|
||||
import com.android.launcher3.shortcuts.DeepShortcutView;
|
||||
import com.android.launcher3.uioverrides.BackgroundBlurController;
|
||||
import com.android.launcher3.uioverrides.DepthController;
|
||||
import com.android.launcher3.util.DynamicResource;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
|
||||
@@ -596,17 +596,17 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
// When launching an app from overview that doesn't map to a task, we still want to just
|
||||
// blur the wallpaper instead of the launcher surface as well
|
||||
boolean allowBlurringLauncher = mLauncher.getStateManager().getState() != OVERVIEW;
|
||||
BackgroundBlurController blurController = mLauncher.getBackgroundBlurController();
|
||||
ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofInt(blurController, BACKGROUND_BLUR,
|
||||
BACKGROUND_APP.getBackgroundBlurRadius(mLauncher))
|
||||
DepthController depthController = mLauncher.getDepthController();
|
||||
ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController, DEPTH,
|
||||
BACKGROUND_APP.getDepth(mLauncher))
|
||||
.setDuration(APP_LAUNCH_DURATION);
|
||||
if (allowBlurringLauncher) {
|
||||
blurController.setSurfaceToApp(RemoteAnimationProvider.findLowestOpaqueLayerTarget(
|
||||
depthController.setSurfaceToApp(RemoteAnimationProvider.findLowestOpaqueLayerTarget(
|
||||
appTargets, MODE_OPENING));
|
||||
backgroundRadiusAnim.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
blurController.setSurfaceToLauncher(mLauncher.getDragLayer());
|
||||
depthController.setSurfaceToLauncher(mLauncher.getDragLayer());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user