summaryrefslogtreecommitdiff
path: root/src_ui_overrides
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2020-02-27 23:34:24 -0800
committerWinson Chung <winsonc@google.com>2020-03-06 14:45:20 -0800
commit8687bc2131ce98ea0d058290dd21f03b5a429c82 (patch)
tree1a49b06b2f30c0239d055b83c8c40626b12f8855 /src_ui_overrides
parentf67ab6c64d0691f7ff1ede3942179172122dac1e (diff)
downloadLauncher3-8687bc2131ce98ea0d058290dd21f03b5a429c82.tar.gz
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
Diffstat (limited to 'src_ui_overrides')
-rw-r--r--src_ui_overrides/com/android/launcher3/uioverrides/BackgroundBlurController.java57
1 files changed, 57 insertions, 0 deletions
diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/BackgroundBlurController.java b/src_ui_overrides/com/android/launcher3/uioverrides/BackgroundBlurController.java
new file mode 100644
index 0000000000..232bad3be7
--- /dev/null
+++ b/src_ui_overrides/com/android/launcher3/uioverrides/BackgroundBlurController.java
@@ -0,0 +1,57 @@
+/*
+ * 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.IntProperty;
+import android.view.View;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherState;
+import com.android.launcher3.LauncherStateManager;
+import com.android.launcher3.anim.AnimatorSetBuilder;
+
+/**
+ * Controls the blur, for the Launcher surface only.
+ */
+public class BackgroundBlurController implements LauncherStateManager.StateHandler {
+
+ public static final IntProperty<BackgroundBlurController> BACKGROUND_BLUR =
+ new IntProperty<BackgroundBlurController>("backgroundBlur") {
+ @Override
+ public void setValue(BackgroundBlurController blurController, int blurRadius) {}
+
+ @Override
+ public Integer get(BackgroundBlurController blurController) {
+ return 0;
+ }
+ };
+
+ public BackgroundBlurController(Launcher l) {}
+
+ public int getFolderBackgroundBlurAdjustment() {
+ return 0;
+ }
+
+ public void setSurfaceToLauncher(View v) {}
+
+ @Override
+ public void setState(LauncherState toState) {}
+
+ @Override
+ public void setStateWithAnimation(LauncherState toState, AnimatorSetBuilder builder,
+ LauncherStateManager.AnimationConfig config) {}
+}