diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java index ce7fa0d413..9dce9847c2 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/AppToOverviewAnimationProvider.java @@ -19,7 +19,7 @@ import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR; -import static com.android.launcher3.uioverrides.DepthController.DEPTH; +import static com.android.launcher3.statehandlers.DepthController.DEPTH; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; @@ -34,7 +34,7 @@ import android.view.View; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.anim.AnimationSuccessListener; -import com.android.launcher3.uioverrides.DepthController; +import com.android.launcher3.statehandlers.DepthController; import com.android.quickstep.util.AppWindowAnimationHelper; import com.android.quickstep.util.AppWindowAnimationHelper.TransformParams; import com.android.quickstep.util.RemoteAnimationProvider; @@ -105,12 +105,6 @@ final class AppToOverviewAnimationProvider exten mRecentsView.setRunningTaskIconScaledDown(true); } - DepthController depthController = mActivityInterface.getDepthController(); - if (depthController != null) { - // Update the surface to be the lowest closing app surface - depthController.setSurfaceToLauncher(mRecentsView); - } - AnimatorSet anim = new AnimatorSet(); anim.addListener(new AnimationSuccessListener() { @Override @@ -123,11 +117,17 @@ final class AppToOverviewAnimationProvider exten }); if (mActivity == null) { Log.e(TAG, "Animation created, before activity"); - anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION)) - .with(createDepthAnimator(depthController)); return anim; } + DepthController depthController = mActivityInterface.getDepthController(); + if (depthController != null) { + anim.play(ObjectAnimator.ofFloat(depthController, DEPTH, + BACKGROUND_APP.getDepth(mActivity), + OVERVIEW.getDepth(mActivity)) + .setDuration(RECENTS_LAUNCH_DURATION)); + } + RemoteAnimationTargets targets = new RemoteAnimationTargets(appTargets, wallpaperTargets, MODE_CLOSING); @@ -135,8 +135,6 @@ final class AppToOverviewAnimationProvider exten RemoteAnimationTargetCompat runningTaskTarget = targets.findTask(mTargetTaskId); if (runningTaskTarget == null) { Log.e(TAG, "No closing app"); - anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION)) - .with(createDepthAnimator(depthController)); return anim; } @@ -183,8 +181,6 @@ final class AppToOverviewAnimationProvider exten transaction.apply(); }); } - anim.play(valueAnimator) - .with(createDepthAnimator(depthController)); return anim; } @@ -196,15 +192,4 @@ final class AppToOverviewAnimationProvider exten long getRecentsLaunchDuration() { return RECENTS_LAUNCH_DURATION; } - - private Animator createDepthAnimator(DepthController depthController) { - if (depthController == null) { - // Dummy animation - return ValueAnimator.ofInt(0); - } - return ObjectAnimator.ofFloat(depthController, DEPTH, - BACKGROUND_APP.getDepth(mActivity), - OVERVIEW.getDepth(mActivity)) - .setDuration(RECENTS_LAUNCH_DURATION); - } } diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java index 55e6ba2117..455ae764a9 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityInterface.java @@ -55,9 +55,9 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.allapps.DiscoveryBounce; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.appprediction.PredictionUiStateManager; +import com.android.launcher3.statehandlers.DepthController; +import com.android.launcher3.statehandlers.DepthController.ClampedDepthProperty; import com.android.launcher3.touch.PagedOrientationHandler; -import com.android.launcher3.uioverrides.DepthController; -import com.android.launcher3.uioverrides.DepthController.ClampedDepthProperty; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.views.FloatingIconView; import com.android.quickstep.SysUINavigationMode.Mode; diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java index cafdb624a5..5bac84403e 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java @@ -294,7 +294,6 @@ public class LauncherSwipeHandler } setupRecentsViewUi(); - mActivityInterface.getDepthController().setSurfaceToLauncher(mRecentsView); if (mDeviceState.getNavMode() == TWO_BUTTONS) { // If the device is in two button mode, swiping up will show overview with predictions diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java index 7ec083e5df..6a3e1feddb 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TaskViewUtils.java @@ -19,7 +19,7 @@ import static com.android.launcher3.LauncherState.BACKGROUND_APP; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; -import static com.android.launcher3.uioverrides.DepthController.DEPTH; +import static com.android.launcher3.statehandlers.DepthController.DEPTH; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; import android.animation.Animator; @@ -35,7 +35,7 @@ import com.android.launcher3.BaseActivity; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.ItemInfo; import com.android.launcher3.Utilities; -import com.android.launcher3.uioverrides.DepthController; +import com.android.launcher3.statehandlers.DepthController; import com.android.quickstep.util.AppWindowAnimationHelper; import com.android.quickstep.util.MultiValueUpdateListener; import com.android.quickstep.views.RecentsView; diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java index a027feaed5..24703bda4a 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/LauncherRecentsView.java @@ -37,9 +37,9 @@ import android.view.MotionEvent; import android.view.View; import android.widget.FrameLayout; +import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Hotseat; -import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager.StateListener; import com.android.launcher3.R; @@ -47,8 +47,8 @@ import com.android.launcher3.anim.Interpolators; import com.android.launcher3.appprediction.PredictionUiStateManager; import com.android.launcher3.appprediction.PredictionUiStateManager.Client; import com.android.launcher3.config.FeatureFlags; +import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.states.RotationHelper; -import com.android.launcher3.uioverrides.DepthController; import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper; import com.android.launcher3.util.TraceHelper; import com.android.launcher3.views.ScrimView; @@ -63,7 +63,8 @@ import com.android.systemui.plugins.RecentsExtraCard; * {@link RecentsView} used in Launcher activity */ @TargetApi(Build.VERSION_CODES.O) -public class LauncherRecentsView extends RecentsView implements StateListener { +public class LauncherRecentsView extends RecentsView + implements StateListener { private static final Rect sTempRect = new Rect(); diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index 68c51a0b34..57a9940925 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -30,7 +30,7 @@ import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; -import static com.android.launcher3.uioverrides.DepthController.DEPTH; +import static com.android.launcher3.statehandlers.DepthController.DEPTH; import static com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController.SUCCESS_TRANSITION_PROGRESS; import static com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch.TAP; import static com.android.launcher3.userevent.nano.LauncherLogProto.ControlType.CLEAR_ALL_BUTTON; @@ -96,9 +96,9 @@ import com.android.launcher3.anim.SpringProperty; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.graphics.RotationMode; +import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.touch.PagedOrientationHandler.CurveProperties; -import com.android.launcher3.uioverrides.DepthController; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java index ec66f115f9..83c67bb5da 100644 --- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java @@ -43,8 +43,9 @@ import com.android.launcher3.model.WellbeingModel; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.proxy.ProxyActivityStarter; import com.android.launcher3.proxy.StartActivityParams; +import com.android.launcher3.statehandlers.BackButtonAlphaHandler; +import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.touch.PagedOrientationHandler; -import com.android.launcher3.uioverrides.BackButtonAlphaHandler; import com.android.launcher3.uioverrides.RecentsViewStateController; import com.android.launcher3.util.UiThreadHelper; import com.android.quickstep.RecentsModel; @@ -67,6 +68,7 @@ import java.util.stream.Stream; public abstract class BaseQuickstepLauncher extends Launcher implements NavigationModeChangeListener { + private DepthController mDepthController = new DepthController(this); protected SystemActions mSystemActions; /** @@ -249,6 +251,10 @@ public abstract class BaseQuickstepLauncher extends Launcher new BackButtonAlphaHandler(this)}; } + public DepthController getDepthController() { + return mDepthController; + } + @Override protected ScaleAndTranslation getOverviewScaleAndTranslationForNormalState() { if (SysUINavigationMode.getMode(this) == Mode.NO_BUTTON) { @@ -294,6 +300,10 @@ public abstract class BaseQuickstepLauncher extends Launcher onLauncherStateOrFocusChanged(); } + if ((changeBits & ACTIVITY_STATE_STARTED) != 0) { + mDepthController.setActivityStarted(isStarted()); + } + super.onActivityFlagsChanged(changeBits); } diff --git a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java index c93a4ba566..a30e102f07 100644 --- a/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java +++ b/quickstep/src/com/android/launcher3/QuickstepAppTransitionManagerImpl.java @@ -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.DepthController.DEPTH; +import static com.android.launcher3.statehandlers.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; @@ -72,7 +72,7 @@ import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.shortcuts.DeepShortcutView; -import com.android.launcher3.uioverrides.DepthController; +import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.util.DynamicResource; import com.android.launcher3.util.MultiValueAlpha; import com.android.launcher3.util.MultiValueAlpha.AlphaProperty; @@ -622,7 +622,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans backgroundRadiusAnim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { - depthController.setSurfaceToLauncher(mLauncher.getDragLayer()); + depthController.setSurfaceToApp(null); } }); } diff --git a/quickstep/src/com/android/launcher3/uioverrides/BackButtonAlphaHandler.java b/quickstep/src/com/android/launcher3/statehandlers/BackButtonAlphaHandler.java similarity index 96% rename from quickstep/src/com/android/launcher3/uioverrides/BackButtonAlphaHandler.java rename to quickstep/src/com/android/launcher3/statehandlers/BackButtonAlphaHandler.java index e82a50455b..983702a97b 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/BackButtonAlphaHandler.java +++ b/quickstep/src/com/android/launcher3/statehandlers/BackButtonAlphaHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.launcher3.uioverrides; +package com.android.launcher3.statehandlers; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.quickstep.AnimatedFloat.VALUE; @@ -29,6 +29,9 @@ import com.android.quickstep.AnimatedFloat; import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.SystemUiProxy; +/** + * State handler for animating back button alpha + */ public class BackButtonAlphaHandler implements LauncherStateManager.StateHandler { private final BaseQuickstepLauncher mLauncher; diff --git a/quickstep/src/com/android/launcher3/uioverrides/DepthController.java b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java similarity index 84% rename from quickstep/src/com/android/launcher3/uioverrides/DepthController.java rename to quickstep/src/com/android/launcher3/statehandlers/DepthController.java index 8995a7e1a0..24ba89a0d3 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/DepthController.java +++ b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java @@ -14,13 +14,14 @@ * limitations under the License. */ -package com.android.launcher3.uioverrides; +package com.android.launcher3.statehandlers; import static com.android.launcher3.anim.Interpolators.LINEAR; import android.os.IBinder; import android.util.FloatProperty; import android.view.View; +import android.view.ViewTreeObserver; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; @@ -77,6 +78,16 @@ public class DepthController implements LauncherStateManager.StateHandler { } } + private final ViewTreeObserver.OnDrawListener mOnDrawListener = + new ViewTreeObserver.OnDrawListener() { + @Override + public void onDraw() { + View view = mLauncher.getDragLayer(); + setSurface(new SurfaceControlCompat(view)); + view.post(() -> view.getViewTreeObserver().removeOnDrawListener(this)); + } + }; + private final Launcher mLauncher; /** * Blur radius when completely zoomed out, in pixels. @@ -102,22 +113,29 @@ public class DepthController implements LauncherStateManager.StateHandler { mWallpaperManager = new WallpaperManagerCompat(mLauncher); } + /** + * Sets if the underlying activity is started or not + */ + public void setActivityStarted(boolean isStarted) { + if (isStarted) { + mLauncher.getDragLayer().getViewTreeObserver().addOnDrawListener(mOnDrawListener); + } else { + mLauncher.getDragLayer().getViewTreeObserver().removeOnDrawListener(mOnDrawListener); + setSurface(null); + } + } + /** * Sets the specified app target surface to apply the blur to. */ public void setSurfaceToApp(RemoteAnimationTargetCompat target) { if (target != null) { setSurface(target.leash); + } else { + setActivityStarted(mLauncher.isStarted()); } } - /** - * Sets the surface to apply the blur to as the launcher surface. - */ - public void setSurfaceToLauncher(View v) { - setSurface(v != null ? new SurfaceControlCompat(v) : null); - } - private void setSurface(SurfaceControlCompat surface) { if (mSurface != surface) { mSurface = surface; diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index 2a569f5d35..94ef15a076 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -32,8 +32,8 @@ import androidx.annotation.UiThread; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.anim.AnimatorPlaybackController; +import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.touch.PagedOrientationHandler; -import com.android.launcher3.uioverrides.DepthController; import com.android.quickstep.util.ActivityInitListener; import com.android.quickstep.util.ShelfPeekAnim; import com.android.systemui.shared.recents.model.ThumbnailData; diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index a83a694c9c..0a22342515 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -77,7 +77,6 @@ import android.view.Menu; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; -import android.view.ViewTreeObserver; import android.view.accessibility.AccessibilityEvent; import android.view.animation.OvershootInterpolator; import android.widget.Toast; @@ -124,7 +123,6 @@ import com.android.launcher3.testing.TestLogging; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.AllAppsSwipeController; import com.android.launcher3.touch.ItemClickHandler; -import com.android.launcher3.uioverrides.DepthController; import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; @@ -326,19 +324,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, private boolean mDeferOverlayCallbacks; private final Runnable mDeferredOverlayCallbacks = this::checkIfOverlayStillDeferred; - private DepthController mDepthController = - new DepthController(this); - - private final ViewTreeObserver.OnDrawListener mOnDrawListener = - new ViewTreeObserver.OnDrawListener() { - @Override - public void onDraw() { - getDepthController().setSurfaceToLauncher(mDragLayer); - mDragLayer.post(() -> mDragLayer.getViewTreeObserver().removeOnDrawListener( - this)); - } - }; - private long mLastTouchUpTime = -1; @Override @@ -942,8 +927,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, final int origDragLayerChildCount = mDragLayer.getChildCount(); super.onStop(); - mDragLayer.getViewTreeObserver().removeOnDrawListener(mOnDrawListener); - if (mDeferOverlayCallbacks) { checkIfOverlayStillDeferred(); } else { @@ -956,7 +939,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, NotificationListener.removeNotificationsChangedListener(); getStateManager().moveToRestState(); - getDepthController().setSurfaceToLauncher(null); // Workaround for b/78520668, explicitly trim memory once UI is hidden onTrimMemory(TRIM_MEMORY_UI_HIDDEN); @@ -984,7 +966,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, if (!mDeferOverlayCallbacks) { mOverlayManager.onActivityStarted(this); } - mDragLayer.getViewTreeObserver().addOnDrawListener(mOnDrawListener); mAppWidgetHost.setListenIfResumed(true); TraceHelper.INSTANCE.endSection(traceToken); @@ -2716,8 +2697,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, } protected StateHandler[] createStateHandlers() { - return new StateHandler[] { getAllAppsController(), getWorkspace(), - getDepthController() }; + return new StateHandler[] { getAllAppsController(), getWorkspace() }; } public TouchController[] createTouchControllers() { @@ -2754,10 +2734,6 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, return Stream.of(APP_INFO, WIDGETS, INSTALL); } - public DepthController getDepthController() { - return mDepthController; - } - public static Launcher getLauncher(Context context) { return fromContext(context); } diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/DepthController.java b/src_ui_overrides/com/android/launcher3/uioverrides/DepthController.java deleted file mode 100644 index 7ad85e22c3..0000000000 --- a/src_ui_overrides/com/android/launcher3/uioverrides/DepthController.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.launcher3.uioverrides; - - -import android.util.FloatProperty; -import android.view.View; - -import com.android.launcher3.Launcher; -import com.android.launcher3.LauncherState; -import com.android.launcher3.LauncherStateManager; -import com.android.launcher3.anim.PendingAnimation; -import com.android.launcher3.states.StateAnimationConfig; - -/** - * Controls blur and wallpaper zoom, for the Launcher surface only. - */ -public class DepthController implements LauncherStateManager.StateHandler { - - public static final FloatProperty DEPTH = - new FloatProperty("depth") { - @Override - public void setValue(DepthController depthController, float depth) {} - - @Override - public Float get(DepthController depthController) { - return 0f; - } - }; - - public DepthController(Launcher l) {} - - public void setSurfaceToLauncher(View v) {} - - @Override - public void setState(LauncherState toState) {} - - @Override - public void setStateWithAnimation(LauncherState toState, StateAnimationConfig config, - PendingAnimation animation) { } -}