Initial changes to support blur

- Add a new controller to update the background blur on either the
  launcher or app surfaces based on state or transition

Bug: 149792636

Change-Id: I6103cd3d53a00c8025558dd49bb73137e2980014
This commit is contained in:
Winson Chung committed 2020-03-06 14:45:20 -08:00
1 parent f67ab6c64d
commit 8687bc2131
24 files changed
+540 -64

No files matched your search

@@ -21,6 +21,7 @@ import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.MAX_NUM_ITEMS_IN_PREVIEW;
import static com.android.launcher3.graphics.IconShape.getShape;
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
import static com.android.launcher3.uioverrides.BackgroundBlurController.BACKGROUND_BLUR;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -46,6 +47,7 @@ import com.android.launcher3.ShortcutAndWidgetContainer;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.PropertyResetListener;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.uioverrides.BackgroundBlurController;
import com.android.launcher3.util.Themes;
import java.util.List;
@@ -220,6 +222,13 @@ public class FolderAnimationManager {
Animator z = getAnimator(mFolder, View.TRANSLATION_Z, -mFolder.getElevation(), 0);
play(a, z, mIsOpening ? midDuration : 0, midDuration);
BackgroundBlurController blurController = mLauncher.getBackgroundBlurController();
int stateBackgroundBlur = mLauncher.getStateManager().getState()
.getBackgroundBlurRadius(mLauncher);
int folderBackgroundBlurAdjustment = blurController.getFolderBackgroundBlurAdjustment();
play(a, ObjectAnimator.ofInt(blurController, BACKGROUND_BLUR, mIsOpening
? stateBackgroundBlur + folderBackgroundBlurAdjustment
: stateBackgroundBlur));
// Store clip variables
CellLayout cellLayout = mContent.getCurrentCellLayout();