From 4c96e5508268f3719576c5bd96746e2f005d2592 Mon Sep 17 00:00:00 2001 From: Nick Chameyev Date: Fri, 26 May 2023 11:50:13 +0100 Subject: [PATCH 1/5] [Unfold animation] Do not preemptively start the animation if it has run already Currently if we open an app, unfold the device and then go to home screen we will start the unfold animation preemptively in Launcher because Launcher activity will receive updated configuration change (where isTablet = true) only after going back to home screen, not when unfolding the device. This causes a problem because SystemUI won't send the unfold animation events after going back home as the animation has already run, so we end up with wrongly started animation in Launcher. This CL fixes the issues by checking if SystemUI has finished the animation (or if it is currently running) to avoid preemptive animation start in this case. This is done by subscribing to the original unfold transition progress provider which emits progress events sent through IPC from SystemUI. Bug: 285150685 Bug: 293131586 Test: open an app on folded screen, unfold, go to home screen => check that icons are not squished Test: fold/unfold when launcher is open (cherry picked from commit 6d756970e77e99ed434c58b815a6eaac1a023a4c) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2e53f5ef97a02d25f508774e82985e24dc2f4d2d) Merged-In: Ic437ff4d19cbd5764635f3007d99880622150f5b Change-Id: Ic437ff4d19cbd5764635f3007d99880622150f5b --- .../uioverrides/QuickstepLauncher.java | 4 ++ .../LauncherUnfoldAnimationController.java | 65 ++++++++++++++++++- .../launcher3/config/FeatureFlags.java | 2 +- 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 2f13c5de44..3139e4d91a 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -472,6 +472,10 @@ public class QuickstepLauncher extends Launcher { public void onDestroy() { mAppTransitionManager.onActivityDestroyed(); if (mUnfoldTransitionProgressProvider != null) { + if (FeatureFlags.RECEIVE_UNFOLD_EVENTS_FROM_SYSUI.get()) { + SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null); + } + mUnfoldTransitionProgressProvider.destroy(); } diff --git a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java index 6d15e8be98..e0b527268c 100644 --- a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java +++ b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java @@ -60,6 +60,8 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL private final NaturalRotationUnfoldProgressProvider mNaturalOrientationProgressProvider; private final UnfoldMoveFromCenterHotseatAnimator mUnfoldMoveFromCenterHotseatAnimator; private final UnfoldMoveFromCenterWorkspaceAnimator mUnfoldMoveFromCenterWorkspaceAnimator; + private final TransitionStatusProvider mExternalTransitionStatusProvider = + new TransitionStatusProvider(); private PreemptiveUnfoldTransitionProgressProvider mPreemptiveProgressProvider = null; private Boolean mIsTablet = null; @@ -88,6 +90,8 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL unfoldTransitionProgressProvider); } + unfoldTransitionProgressProvider.addCallback(mExternalTransitionStatusProvider); + mUnfoldMoveFromCenterHotseatAnimator = new UnfoldMoveFromCenterHotseatAnimator(launcher, windowManager, rotationChangeProvider); mUnfoldMoveFromCenterWorkspaceAnimator = new UnfoldMoveFromCenterWorkspaceAnimator(launcher, @@ -166,11 +170,26 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL } if (mIsTablet != null && dp.isTablet != mIsTablet) { - if (dp.isTablet && SystemUiProxy.INSTANCE.get(mLauncher).isActive()) { + // We should preemptively start the animation only if: + // - We changed to the unfolded screen + // - SystemUI IPC connection is alive, so we won't end up in a situation that we won't + // receive transition progress events from SystemUI later because there was no + // IPC connection established (e.g. because of SystemUI crash) + // - SystemUI has not already sent unfold animation progress events. This might happen + // if Launcher was not open during unfold, in this case we receive the configuration + // change only after we went back to home screen and we don't want to start the + // animation in this case. + if (dp.isTablet + && SystemUiProxy.INSTANCE.get(mLauncher).isActive() + && !mExternalTransitionStatusProvider.hasRun()) { // Preemptively start the unfold animation to make sure that we have drawn // the first frame of the animation before the screen gets unblocked preemptivelyStartAnimationOnNextFrame(); } + + if (!dp.isTablet) { + mExternalTransitionStatusProvider.onFolded(); + } } mIsTablet = dp.isTablet; @@ -222,4 +241,48 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL HOTSEAT_SCALE_PROPERTY.setValue(mLauncher.getHotseat(), value); } } + + /** + * Class to track the current status of the external transition provider (the events are coming + * from the SystemUI side through IPC), it allows to check if the transition has already + * finished or currently running on the SystemUI side since last unfold. + */ + private static class TransitionStatusProvider implements TransitionProgressListener { + + private boolean mHasRun = false; + + @Override + public void onTransitionStarted() { + markAsRun(); + } + + @Override + public void onTransitionProgress(float progress) { + markAsRun(); + } + + @Override + public void onTransitionFinished() { + markAsRun(); + } + + /** + * Called when the device is folded, so we can reset the status of the animation + */ + public void onFolded() { + mHasRun = false; + } + + /** + * Returns true if there was an animation already (or it is currently running) after + * unfolding the device + */ + public boolean hasRun() { + return mHasRun; + } + + private void markAsRun() { + mHasRun = true; + } + } } diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index b255ea8a18..76574b69c7 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -302,7 +302,7 @@ public final class FeatureFlags { "Enable widget transition animation when resizing the widgets"); public static final BooleanFlag PREEMPTIVE_UNFOLD_ANIMATION_START = getDebugFlag(270397209, - "PREEMPTIVE_UNFOLD_ANIMATION_START", DISABLED, + "PREEMPTIVE_UNFOLD_ANIMATION_START", ENABLED, "Enables starting the unfold animation preemptively when unfolding, without" + "waiting for SystemUI and then merging the SystemUI progress whenever we " + "start receiving the events"); From 1f5e248da0b95ba396d30bf2ecb71da8a0841ab8 Mon Sep 17 00:00:00 2001 From: Nick Chameyev Date: Fri, 26 May 2023 11:50:13 +0100 Subject: [PATCH 2/5] [Unfold animation] Do not preemptively start the animation if it has run already Currently if we open an app, unfold the device and then go to home screen we will start the unfold animation preemptively in Launcher because Launcher activity will receive updated configuration change (where isTablet = true) only after going back to home screen, not when unfolding the device. This causes a problem because SystemUI won't send the unfold animation events after going back home as the animation has already run, so we end up with wrongly started animation in Launcher. This CL fixes the issues by checking if SystemUI has finished the animation (or if it is currently running) to avoid preemptive animation start in this case. This is done by subscribing to the original unfold transition progress provider which emits progress events sent through IPC from SystemUI. Bug: 285150685 Bug: 293131586 Test: open an app on folded screen, unfold, go to home screen => check that icons are not squished Test: fold/unfold when launcher is open (cherry picked from commit 6d756970e77e99ed434c58b815a6eaac1a023a4c) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2e53f5ef97a02d25f508774e82985e24dc2f4d2d) Merged-In: Ic437ff4d19cbd5764635f3007d99880622150f5b Change-Id: Ic437ff4d19cbd5764635f3007d99880622150f5b --- .../uioverrides/QuickstepLauncher.java | 4 ++ .../LauncherUnfoldAnimationController.java | 65 ++++++++++++++++++- .../launcher3/config/FeatureFlags.java | 2 +- 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 2f13c5de44..3139e4d91a 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -472,6 +472,10 @@ public class QuickstepLauncher extends Launcher { public void onDestroy() { mAppTransitionManager.onActivityDestroyed(); if (mUnfoldTransitionProgressProvider != null) { + if (FeatureFlags.RECEIVE_UNFOLD_EVENTS_FROM_SYSUI.get()) { + SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null); + } + mUnfoldTransitionProgressProvider.destroy(); } diff --git a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java index 6d15e8be98..e0b527268c 100644 --- a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java +++ b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java @@ -60,6 +60,8 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL private final NaturalRotationUnfoldProgressProvider mNaturalOrientationProgressProvider; private final UnfoldMoveFromCenterHotseatAnimator mUnfoldMoveFromCenterHotseatAnimator; private final UnfoldMoveFromCenterWorkspaceAnimator mUnfoldMoveFromCenterWorkspaceAnimator; + private final TransitionStatusProvider mExternalTransitionStatusProvider = + new TransitionStatusProvider(); private PreemptiveUnfoldTransitionProgressProvider mPreemptiveProgressProvider = null; private Boolean mIsTablet = null; @@ -88,6 +90,8 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL unfoldTransitionProgressProvider); } + unfoldTransitionProgressProvider.addCallback(mExternalTransitionStatusProvider); + mUnfoldMoveFromCenterHotseatAnimator = new UnfoldMoveFromCenterHotseatAnimator(launcher, windowManager, rotationChangeProvider); mUnfoldMoveFromCenterWorkspaceAnimator = new UnfoldMoveFromCenterWorkspaceAnimator(launcher, @@ -166,11 +170,26 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL } if (mIsTablet != null && dp.isTablet != mIsTablet) { - if (dp.isTablet && SystemUiProxy.INSTANCE.get(mLauncher).isActive()) { + // We should preemptively start the animation only if: + // - We changed to the unfolded screen + // - SystemUI IPC connection is alive, so we won't end up in a situation that we won't + // receive transition progress events from SystemUI later because there was no + // IPC connection established (e.g. because of SystemUI crash) + // - SystemUI has not already sent unfold animation progress events. This might happen + // if Launcher was not open during unfold, in this case we receive the configuration + // change only after we went back to home screen and we don't want to start the + // animation in this case. + if (dp.isTablet + && SystemUiProxy.INSTANCE.get(mLauncher).isActive() + && !mExternalTransitionStatusProvider.hasRun()) { // Preemptively start the unfold animation to make sure that we have drawn // the first frame of the animation before the screen gets unblocked preemptivelyStartAnimationOnNextFrame(); } + + if (!dp.isTablet) { + mExternalTransitionStatusProvider.onFolded(); + } } mIsTablet = dp.isTablet; @@ -222,4 +241,48 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL HOTSEAT_SCALE_PROPERTY.setValue(mLauncher.getHotseat(), value); } } + + /** + * Class to track the current status of the external transition provider (the events are coming + * from the SystemUI side through IPC), it allows to check if the transition has already + * finished or currently running on the SystemUI side since last unfold. + */ + private static class TransitionStatusProvider implements TransitionProgressListener { + + private boolean mHasRun = false; + + @Override + public void onTransitionStarted() { + markAsRun(); + } + + @Override + public void onTransitionProgress(float progress) { + markAsRun(); + } + + @Override + public void onTransitionFinished() { + markAsRun(); + } + + /** + * Called when the device is folded, so we can reset the status of the animation + */ + public void onFolded() { + mHasRun = false; + } + + /** + * Returns true if there was an animation already (or it is currently running) after + * unfolding the device + */ + public boolean hasRun() { + return mHasRun; + } + + private void markAsRun() { + mHasRun = true; + } + } } diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index b255ea8a18..76574b69c7 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -302,7 +302,7 @@ public final class FeatureFlags { "Enable widget transition animation when resizing the widgets"); public static final BooleanFlag PREEMPTIVE_UNFOLD_ANIMATION_START = getDebugFlag(270397209, - "PREEMPTIVE_UNFOLD_ANIMATION_START", DISABLED, + "PREEMPTIVE_UNFOLD_ANIMATION_START", ENABLED, "Enables starting the unfold animation preemptively when unfolding, without" + "waiting for SystemUI and then merging the SystemUI progress whenever we " + "start receiving the events"); From 14b4f9edcc92dfb6161272e17921c3271de9c12b Mon Sep 17 00:00:00 2001 From: Nick Chameyev Date: Fri, 26 May 2023 11:50:13 +0100 Subject: [PATCH 3/5] [Unfold animation] Do not preemptively start the animation if it has run already Currently if we open an app, unfold the device and then go to home screen we will start the unfold animation preemptively in Launcher because Launcher activity will receive updated configuration change (where isTablet = true) only after going back to home screen, not when unfolding the device. This causes a problem because SystemUI won't send the unfold animation events after going back home as the animation has already run, so we end up with wrongly started animation in Launcher. This CL fixes the issues by checking if SystemUI has finished the animation (or if it is currently running) to avoid preemptive animation start in this case. This is done by subscribing to the original unfold transition progress provider which emits progress events sent through IPC from SystemUI. Bug: 285150685 Bug: 293131586 Test: open an app on folded screen, unfold, go to home screen => check that icons are not squished Test: fold/unfold when launcher is open (cherry picked from commit 6d756970e77e99ed434c58b815a6eaac1a023a4c) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2e53f5ef97a02d25f508774e82985e24dc2f4d2d) Merged-In: Ic437ff4d19cbd5764635f3007d99880622150f5b Change-Id: Ic437ff4d19cbd5764635f3007d99880622150f5b --- .../uioverrides/QuickstepLauncher.java | 4 ++ .../LauncherUnfoldAnimationController.java | 65 ++++++++++++++++++- .../launcher3/config/FeatureFlags.java | 2 +- 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 2f13c5de44..3139e4d91a 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -472,6 +472,10 @@ public class QuickstepLauncher extends Launcher { public void onDestroy() { mAppTransitionManager.onActivityDestroyed(); if (mUnfoldTransitionProgressProvider != null) { + if (FeatureFlags.RECEIVE_UNFOLD_EVENTS_FROM_SYSUI.get()) { + SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null); + } + mUnfoldTransitionProgressProvider.destroy(); } diff --git a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java index 6d15e8be98..e0b527268c 100644 --- a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java +++ b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java @@ -60,6 +60,8 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL private final NaturalRotationUnfoldProgressProvider mNaturalOrientationProgressProvider; private final UnfoldMoveFromCenterHotseatAnimator mUnfoldMoveFromCenterHotseatAnimator; private final UnfoldMoveFromCenterWorkspaceAnimator mUnfoldMoveFromCenterWorkspaceAnimator; + private final TransitionStatusProvider mExternalTransitionStatusProvider = + new TransitionStatusProvider(); private PreemptiveUnfoldTransitionProgressProvider mPreemptiveProgressProvider = null; private Boolean mIsTablet = null; @@ -88,6 +90,8 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL unfoldTransitionProgressProvider); } + unfoldTransitionProgressProvider.addCallback(mExternalTransitionStatusProvider); + mUnfoldMoveFromCenterHotseatAnimator = new UnfoldMoveFromCenterHotseatAnimator(launcher, windowManager, rotationChangeProvider); mUnfoldMoveFromCenterWorkspaceAnimator = new UnfoldMoveFromCenterWorkspaceAnimator(launcher, @@ -166,11 +170,26 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL } if (mIsTablet != null && dp.isTablet != mIsTablet) { - if (dp.isTablet && SystemUiProxy.INSTANCE.get(mLauncher).isActive()) { + // We should preemptively start the animation only if: + // - We changed to the unfolded screen + // - SystemUI IPC connection is alive, so we won't end up in a situation that we won't + // receive transition progress events from SystemUI later because there was no + // IPC connection established (e.g. because of SystemUI crash) + // - SystemUI has not already sent unfold animation progress events. This might happen + // if Launcher was not open during unfold, in this case we receive the configuration + // change only after we went back to home screen and we don't want to start the + // animation in this case. + if (dp.isTablet + && SystemUiProxy.INSTANCE.get(mLauncher).isActive() + && !mExternalTransitionStatusProvider.hasRun()) { // Preemptively start the unfold animation to make sure that we have drawn // the first frame of the animation before the screen gets unblocked preemptivelyStartAnimationOnNextFrame(); } + + if (!dp.isTablet) { + mExternalTransitionStatusProvider.onFolded(); + } } mIsTablet = dp.isTablet; @@ -222,4 +241,48 @@ public class LauncherUnfoldAnimationController implements OnDeviceProfileChangeL HOTSEAT_SCALE_PROPERTY.setValue(mLauncher.getHotseat(), value); } } + + /** + * Class to track the current status of the external transition provider (the events are coming + * from the SystemUI side through IPC), it allows to check if the transition has already + * finished or currently running on the SystemUI side since last unfold. + */ + private static class TransitionStatusProvider implements TransitionProgressListener { + + private boolean mHasRun = false; + + @Override + public void onTransitionStarted() { + markAsRun(); + } + + @Override + public void onTransitionProgress(float progress) { + markAsRun(); + } + + @Override + public void onTransitionFinished() { + markAsRun(); + } + + /** + * Called when the device is folded, so we can reset the status of the animation + */ + public void onFolded() { + mHasRun = false; + } + + /** + * Returns true if there was an animation already (or it is currently running) after + * unfolding the device + */ + public boolean hasRun() { + return mHasRun; + } + + private void markAsRun() { + mHasRun = true; + } + } } diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java index b255ea8a18..76574b69c7 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -302,7 +302,7 @@ public final class FeatureFlags { "Enable widget transition animation when resizing the widgets"); public static final BooleanFlag PREEMPTIVE_UNFOLD_ANIMATION_START = getDebugFlag(270397209, - "PREEMPTIVE_UNFOLD_ANIMATION_START", DISABLED, + "PREEMPTIVE_UNFOLD_ANIMATION_START", ENABLED, "Enables starting the unfold animation preemptively when unfolding, without" + "waiting for SystemUI and then merging the SystemUI progress whenever we " + "start receiving the events"); From c02dabfb5973764fbf5dc3c271aaf31d592f61c0 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Thu, 3 Aug 2023 15:32:46 +0100 Subject: [PATCH 4/5] Fix return condition in getWorkspacePageTranslationProvider - When EDIT_MODE was introduced, it added a wrong condition to make it always return DEFAULT_PAGE_TRANSLATION_PROVIDER Bug: 294228521 Test: manual (cherry picked from commit c325c686c73498a7041a2bd85a97c03583f2526c) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4bfc0ee720e4ee80035c7ef59cf2d8d095cf9d72) Merged-In: If970949c8ab55bc67f98f987a7654ec2db89cdfb Change-Id: If970949c8ab55bc67f98f987a7654ec2db89cdfb --- src/com/android/launcher3/LauncherState.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java index 8b124dc847..6097fb1947 100644 --- a/src/com/android/launcher3/LauncherState.java +++ b/src/com/android/launcher3/LauncherState.java @@ -331,8 +331,7 @@ public abstract class LauncherState implements BaseState { * Gets the translation provider for workspace pages. */ public PageTranslationProvider getWorkspacePageTranslationProvider(Launcher launcher) { - if (this != SPRING_LOADED - || this != EDIT_MODE + if (!(this == SPRING_LOADED || this == EDIT_MODE) || !launcher.getDeviceProfile().isTwoPanels) { return DEFAULT_PAGE_TRANSLATION_PROVIDER; } From b38e61a3397806e23e57bfd8c2df0102e8bb64f2 Mon Sep 17 00:00:00 2001 From: Luca Zuccarini Date: Wed, 26 Jul 2023 15:24:43 +0000 Subject: [PATCH 5/5] Animate depth from the right value on Taskbar All Apps launches. `MyDepthController` in `QuickstepTransitionLauncher` assumes that we want the background to always animate the same way, matching the rest state of the workspace (depth == 0). However, in Taskbar All Apps the background is visible, and depth != 0. We now initialize the one-off `DepthController` for launches to take into account the latest depth set by the top level `DepthController`, so there is no jumpcut at the beginning of the animation. Note that in my opinion we should use the same `DepthController` for all cases, rather than having this one-off. I'm looking into the feasibility of that change, but for now this fixes the issue at hand. Fix: 292959100 Flag: N/A Test: manual, see videos in the bug (cherry picked from commit 627d67549f73c4c456537f814e450fa8a1318937) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3e91646d123abbe58ccc0544746145ce5024b923) Merged-In: Id90e8e728cc3e2ccf7d92148fbb0d6ff3e6fd6ca Change-Id: Id90e8e728cc3e2ccf7d92148fbb0d6ff3e6fd6ca --- .../android/launcher3/QuickstepTransitionManager.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index ca9c5771b1..75f25ac7c2 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -1046,7 +1046,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener boolean allowBlurringLauncher = mLauncher.getStateManager().getState() != OVERVIEW && BlurUtils.supportsBlursOnWindows(); - MyDepthController depthController = new MyDepthController(mLauncher); + LaunchDepthController depthController = new LaunchDepthController(mLauncher); ObjectAnimator backgroundRadiusAnim = ObjectAnimator.ofFloat(depthController.stateDepth, MULTI_PROPERTY_VALUE, BACKGROUND_APP.getDepth(mLauncher)) .setDuration(APP_LAUNCH_DURATION); @@ -2047,11 +2047,14 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener } } - private static class MyDepthController extends DepthController { - MyDepthController(Launcher l) { - super(l); + private static class LaunchDepthController extends DepthController { + LaunchDepthController(QuickstepLauncher launcher) { + super(launcher); setCrossWindowBlursEnabled( CrossWindowBlurListeners.getInstance().isCrossWindowBlurEnabled()); + // Make sure that the starting value matches the current depth set by the main + // controller. + stateDepth.setValue(launcher.getDepthController().stateDepth.getValue()); } } }