Loading quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +6 −3 Original line number Diff line number Diff line Loading @@ -981,11 +981,14 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener depthController.setSurface(dimLayer); backgroundRadiusAnim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { depthController.setIsInLaunchTransition(true); } @Override public void onAnimationEnd(Animator animation) { // Reset depth at the end of the launch animation, so the wallpaper won't be // zoomed out if an app crashes. DEPTH.setValue(depthController, 0f); depthController.setIsInLaunchTransition(false); depthController.setSurface(null); if (dimLayer != null) { new SurfaceControl.Transaction() Loading quickstep/src/com/android/launcher3/statehandlers/DepthController.java +19 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.os.IBinder; import android.os.SystemProperties; import android.util.FloatProperty; import android.view.CrossWindowBlurListeners; import android.view.SurfaceControl; Loading Loading @@ -117,6 +118,10 @@ public class DepthController implements StateHandler<LauncherState>, * @see android.service.wallpaper.WallpaperService.Engine#onZoomChanged(float) */ private float mDepth; /** * If we're launching and app and should not be blurring the screen for performance reasons. */ private boolean mBlurDisabledForAppLaunch; // Workaround for animating the depth when multiwindow mode changes. private boolean mIgnoreStateChangesDuringMultiWindowAnimation = false; Loading Loading @@ -211,6 +216,19 @@ public class DepthController implements StateHandler<LauncherState>, } } /** * If we're launching an app from the home screen. */ public void setIsInLaunchTransition(boolean inLaunchTransition) { boolean blurEnabled = SystemProperties.getBoolean("ro.launcher.blur.appLaunch", true); mBlurDisabledForAppLaunch = inLaunchTransition && !blurEnabled; if (!inLaunchTransition) { // Reset depth at the end of the launch animation, so the wallpaper won't be // zoomed out if an app crashes. setDepth(0f); } } private void setDepth(float depth) { depth = Utilities.boundToRange(depth, 0, 1); // Round out the depth to dedupe frequent, non-perceptable updates Loading Loading @@ -238,7 +256,7 @@ public class DepthController implements StateHandler<LauncherState>, boolean opaque = mLauncher.getScrimView().isFullyOpaque() && !isOverview; int blur = opaque || isOverview || !mCrossWindowBlursEnabled ? 0 : (int) (mDepth * mMaxBlurRadius); || mBlurDisabledForAppLaunch ? 0 : (int) (mDepth * mMaxBlurRadius); new SurfaceControl.Transaction() .setBackgroundBlurRadius(mSurface, blur) .setOpaque(mSurface, opaque) Loading quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +1 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKG import android.content.Context; import android.graphics.Color; import android.os.SystemProperties; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; Loading Loading @@ -85,8 +84,7 @@ public class BackgroundAppState extends OverviewState { @Override protected float getDepthUnchecked(Context context) { //TODO revert when b/178661709 is fixed return SystemProperties.getBoolean("ro.launcher.depth.appLaunch", true) ? 1 : 0; return 1; } @Override Loading Loading
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +6 −3 Original line number Diff line number Diff line Loading @@ -981,11 +981,14 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener depthController.setSurface(dimLayer); backgroundRadiusAnim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { depthController.setIsInLaunchTransition(true); } @Override public void onAnimationEnd(Animator animation) { // Reset depth at the end of the launch animation, so the wallpaper won't be // zoomed out if an app crashes. DEPTH.setValue(depthController, 0f); depthController.setIsInLaunchTransition(false); depthController.setSurface(null); if (dimLayer != null) { new SurfaceControl.Transaction() Loading
quickstep/src/com/android/launcher3/statehandlers/DepthController.java +19 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.os.IBinder; import android.os.SystemProperties; import android.util.FloatProperty; import android.view.CrossWindowBlurListeners; import android.view.SurfaceControl; Loading Loading @@ -117,6 +118,10 @@ public class DepthController implements StateHandler<LauncherState>, * @see android.service.wallpaper.WallpaperService.Engine#onZoomChanged(float) */ private float mDepth; /** * If we're launching and app and should not be blurring the screen for performance reasons. */ private boolean mBlurDisabledForAppLaunch; // Workaround for animating the depth when multiwindow mode changes. private boolean mIgnoreStateChangesDuringMultiWindowAnimation = false; Loading Loading @@ -211,6 +216,19 @@ public class DepthController implements StateHandler<LauncherState>, } } /** * If we're launching an app from the home screen. */ public void setIsInLaunchTransition(boolean inLaunchTransition) { boolean blurEnabled = SystemProperties.getBoolean("ro.launcher.blur.appLaunch", true); mBlurDisabledForAppLaunch = inLaunchTransition && !blurEnabled; if (!inLaunchTransition) { // Reset depth at the end of the launch animation, so the wallpaper won't be // zoomed out if an app crashes. setDepth(0f); } } private void setDepth(float depth) { depth = Utilities.boundToRange(depth, 0, 1); // Round out the depth to dedupe frequent, non-perceptable updates Loading Loading @@ -238,7 +256,7 @@ public class DepthController implements StateHandler<LauncherState>, boolean opaque = mLauncher.getScrimView().isFullyOpaque() && !isOverview; int blur = opaque || isOverview || !mCrossWindowBlursEnabled ? 0 : (int) (mDepth * mMaxBlurRadius); || mBlurDisabledForAppLaunch ? 0 : (int) (mDepth * mMaxBlurRadius); new SurfaceControl.Transaction() .setBackgroundBlurRadius(mSurface, blur) .setOpaque(mSurface, opaque) Loading
quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +1 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKG import android.content.Context; import android.graphics.Color; import android.os.SystemProperties; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; Loading Loading @@ -85,8 +84,7 @@ public class BackgroundAppState extends OverviewState { @Override protected float getDepthUnchecked(Context context) { //TODO revert when b/178661709 is fixed return SystemProperties.getBoolean("ro.launcher.depth.appLaunch", true) ? 1 : 0; return 1; } @Override Loading