Loading quickstep/src/com/android/launcher3/statehandlers/DepthController.java +21 −17 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.statemanager.StateManager.StateHandler; import com.android.launcher3.states.StateAnimationConfig; import com.android.systemui.shared.system.BlurUtils; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SurfaceControlCompat; import com.android.systemui.shared.system.TransactionCompat; Loading Loading @@ -110,6 +111,10 @@ public class DepthController implements StateHandler<LauncherState> { } private void ensureDependencies() { if (mWallpaperManager == null) { mMaxBlurRadius = mLauncher.getResources().getInteger(R.integer.max_depth_blur_radius); mWallpaperManager = new WallpaperManagerCompat(mLauncher); } if (mLauncher.getRootView() != null && mOnAttachListener == null) { mOnAttachListener = new View.OnAttachStateChangeListener() { @Override Loading @@ -127,11 +132,6 @@ public class DepthController implements StateHandler<LauncherState> { }; mLauncher.getRootView().addOnAttachStateChangeListener(mOnAttachListener); } if (mWallpaperManager != null) { return; } mMaxBlurRadius = mLauncher.getResources().getInteger(R.integer.max_depth_blur_radius); mWallpaperManager = new WallpaperManagerCompat(mLauncher); } /** Loading Loading @@ -205,7 +205,8 @@ public class DepthController implements StateHandler<LauncherState> { return; } if (mSurface == null || !mSurface.isValid()) { boolean supportsBlur = BlurUtils.supportsBlursOnWindows(); if (supportsBlur && (mSurface == null || !mSurface.isValid())) { return; } mDepth = depthF; Loading @@ -214,6 +215,8 @@ public class DepthController implements StateHandler<LauncherState> { if (windowToken != null) { mWallpaperManager.setWallpaperZoomOut(windowToken, mDepth); } if (supportsBlur) { final int blur; if (mLauncher.isInState(LauncherState.ALL_APPS) && mDepth == 1) { // All apps has a solid background. We don't need to draw blurs after it's fully Loading @@ -228,3 +231,4 @@ public class DepthController implements StateHandler<LauncherState> { .apply(); } } } Loading
quickstep/src/com/android/launcher3/statehandlers/DepthController.java +21 −17 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.statemanager.StateManager.StateHandler; import com.android.launcher3.states.StateAnimationConfig; import com.android.systemui.shared.system.BlurUtils; import com.android.systemui.shared.system.RemoteAnimationTargetCompat; import com.android.systemui.shared.system.SurfaceControlCompat; import com.android.systemui.shared.system.TransactionCompat; Loading Loading @@ -110,6 +111,10 @@ public class DepthController implements StateHandler<LauncherState> { } private void ensureDependencies() { if (mWallpaperManager == null) { mMaxBlurRadius = mLauncher.getResources().getInteger(R.integer.max_depth_blur_radius); mWallpaperManager = new WallpaperManagerCompat(mLauncher); } if (mLauncher.getRootView() != null && mOnAttachListener == null) { mOnAttachListener = new View.OnAttachStateChangeListener() { @Override Loading @@ -127,11 +132,6 @@ public class DepthController implements StateHandler<LauncherState> { }; mLauncher.getRootView().addOnAttachStateChangeListener(mOnAttachListener); } if (mWallpaperManager != null) { return; } mMaxBlurRadius = mLauncher.getResources().getInteger(R.integer.max_depth_blur_radius); mWallpaperManager = new WallpaperManagerCompat(mLauncher); } /** Loading Loading @@ -205,7 +205,8 @@ public class DepthController implements StateHandler<LauncherState> { return; } if (mSurface == null || !mSurface.isValid()) { boolean supportsBlur = BlurUtils.supportsBlursOnWindows(); if (supportsBlur && (mSurface == null || !mSurface.isValid())) { return; } mDepth = depthF; Loading @@ -214,6 +215,8 @@ public class DepthController implements StateHandler<LauncherState> { if (windowToken != null) { mWallpaperManager.setWallpaperZoomOut(windowToken, mDepth); } if (supportsBlur) { final int blur; if (mLauncher.isInState(LauncherState.ALL_APPS) && mDepth == 1) { // All apps has a solid background. We don't need to draw blurs after it's fully Loading @@ -228,3 +231,4 @@ public class DepthController implements StateHandler<LauncherState> { .apply(); } } }