diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index c1df403b54..cdd8f5a1c8 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -19,6 +19,7 @@ package com.android.launcher3; import static android.animation.ValueAnimator.areAnimatorsEnabled; import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5; +import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING; import static com.android.launcher3.dragndrop.DraggableView.DRAGGABLE_ICON; import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR; @@ -552,7 +553,9 @@ public class CellLayout extends ViewGroup { public void setSpringLoadedProgress(float progress) { if (Float.compare(progress, mSpringLoadedProgress) != 0) { mSpringLoadedProgress = progress; - updateBgAlpha(); + if (!SHOW_HOME_GARDENING.get()) { + updateBgAlpha(); + } setGridAlpha(progress); } } @@ -577,7 +580,9 @@ public class CellLayout extends ViewGroup { public void setScrollProgress(float progress) { if (Float.compare(Math.abs(progress), mScrollProgress) != 0) { mScrollProgress = Math.abs(progress); - updateBgAlpha(); + if (!SHOW_HOME_GARDENING.get()) { + updateBgAlpha(); + } } } @@ -616,7 +621,7 @@ public class CellLayout extends ViewGroup { } } - if (mVisualizeDropLocation) { + if (mVisualizeDropLocation && !SHOW_HOME_GARDENING.get()) { for (int i = 0; i < mDragOutlines.length; i++) { final float alpha = mDragOutlineAlphas[i]; if (alpha <= 0) continue; diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 6aff83e300..5d388dcbed 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -107,7 +107,6 @@ import com.android.launcher3.util.PackageUserKey; import com.android.launcher3.util.RunnableList; import com.android.launcher3.util.Thunk; import com.android.launcher3.util.WallpaperOffsetInterpolator; -import com.android.launcher3.views.ActivityContext; import com.android.launcher3.widget.LauncherAppWidgetHost; import com.android.launcher3.widget.LauncherAppWidgetHost.ProviderChangedListener; import com.android.launcher3.widget.LauncherAppWidgetHostView; diff --git a/src/com/android/launcher3/states/SpringLoadedState.java b/src/com/android/launcher3/states/SpringLoadedState.java index 3286afb67c..f5d511c7d3 100644 --- a/src/com/android/launcher3/states/SpringLoadedState.java +++ b/src/com/android/launcher3/states/SpringLoadedState.java @@ -15,6 +15,7 @@ */ package com.android.launcher3.states; +import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING; import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME; import android.content.Context; @@ -44,6 +45,11 @@ public class SpringLoadedState extends LauncherState { @Override public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) { + + if (SHOW_HOME_GARDENING.get()) { + return super.getWorkspaceScaleAndTranslation(launcher); + } + DeviceProfile grid = launcher.getDeviceProfile(); Workspace ws = launcher.getWorkspace(); if (ws.getChildCount() == 0) { @@ -62,6 +68,9 @@ public class SpringLoadedState extends LauncherState { @Override protected float getDepthUnchecked(Context context) { + if (SHOW_HOME_GARDENING.get()) { + return 0; + } return 0.5f; } @@ -72,6 +81,10 @@ public class SpringLoadedState extends LauncherState { @Override public float getWorkspaceBackgroundAlpha(Launcher launcher) { + if (SHOW_HOME_GARDENING.get()) { + return 0; + } + return 0.2f; } }