Loading quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +10 −1 Original line number Diff line number Diff line Loading @@ -709,11 +709,20 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag AnimatorSet anim = new AnimatorSet(); anim.play(getClosingWindowAnimators(targetCompats)); if (launcherIsATargetWithMode(targetCompats, MODE_OPENING)) { // Normally, we run the launcher content animation when we are transitioning home, // but if home is already visible, then we don't want to animate the contents of // launcher unless we know that we are animating home as a result of the home button // press with quickstep, which will result in launcher being started on touch down, // prior to the animation home (and won't be in the targets list because it is // already visible). In that case, we force invisibility on touch down, and only // reset it after the animation to home is initialized. if (launcherIsATargetWithMode(targetCompats, MODE_OPENING) || mLauncher.isForceInvisible()) { // Only register the content animation for cancellation when state changes mLauncher.getStateManager().setCurrentAnimation(anim); createLauncherResumeAnimation(anim); } mLauncher.setForceInvisible(false); return anim; } }; Loading quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -340,6 +340,9 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { } mWasLauncherAlreadyVisible = alreadyOnHome; mActivity = activity; // Override the visibility of the activity until the gesture actually starts and we swipe // up, or until we transition home and the home animation is composed mActivity.setForceInvisible(true); mRecentsView = activity.getOverviewPanel(); mQuickScrubController = mRecentsView.getQuickScrubController(); Loading Loading @@ -613,6 +616,9 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { private void notifyGestureStarted() { final T curActivity = mActivity; if (curActivity != null) { // Once the gesture starts, we can no longer transition home through the button, so // reset the force override of the activity visibility mActivity.setForceInvisible(false); mActivityControlHelper.onQuickstepGestureStarted( curActivity, mWasLauncherAlreadyVisible); } Loading src/com/android/launcher3/BaseActivity.java +20 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ public abstract class BaseActivity extends Activity { protected SystemUiController mSystemUiController; private boolean mStarted; // When the recents animation is running, the visibility of the Launcher is managed by the // animation private boolean mForceInvisible; private boolean mUserActive; public DeviceProfile getDeviceProfile() { Loading Loading @@ -100,6 +103,7 @@ public abstract class BaseActivity extends Activity { @Override protected void onStop() { mStarted = false; mForceInvisible = false; super.onStop(); } Loading @@ -125,6 +129,22 @@ public abstract class BaseActivity extends Activity { } } /** * Used to set the override visibility state, used only to handle the transition home with the * recents animation. * @see LauncherAppTransitionManagerImpl.getWallpaperOpenRunner() */ public void setForceInvisible(boolean invisible) { mForceInvisible = invisible; } /** * @return Wether this activity should be considered invisible regardless of actual visibility. */ public boolean isForceInvisible() { return mForceInvisible; } /** * Sets the device profile, adjusting it accordingly in case of multi-window */ Loading Loading
quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java +10 −1 Original line number Diff line number Diff line Loading @@ -709,11 +709,20 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag AnimatorSet anim = new AnimatorSet(); anim.play(getClosingWindowAnimators(targetCompats)); if (launcherIsATargetWithMode(targetCompats, MODE_OPENING)) { // Normally, we run the launcher content animation when we are transitioning home, // but if home is already visible, then we don't want to animate the contents of // launcher unless we know that we are animating home as a result of the home button // press with quickstep, which will result in launcher being started on touch down, // prior to the animation home (and won't be in the targets list because it is // already visible). In that case, we force invisibility on touch down, and only // reset it after the animation to home is initialized. if (launcherIsATargetWithMode(targetCompats, MODE_OPENING) || mLauncher.isForceInvisible()) { // Only register the content animation for cancellation when state changes mLauncher.getStateManager().setCurrentAnimation(anim); createLauncherResumeAnimation(anim); } mLauncher.setForceInvisible(false); return anim; } }; Loading
quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +6 −0 Original line number Diff line number Diff line Loading @@ -340,6 +340,9 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { } mWasLauncherAlreadyVisible = alreadyOnHome; mActivity = activity; // Override the visibility of the activity until the gesture actually starts and we swipe // up, or until we transition home and the home animation is composed mActivity.setForceInvisible(true); mRecentsView = activity.getOverviewPanel(); mQuickScrubController = mRecentsView.getQuickScrubController(); Loading Loading @@ -613,6 +616,9 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> { private void notifyGestureStarted() { final T curActivity = mActivity; if (curActivity != null) { // Once the gesture starts, we can no longer transition home through the button, so // reset the force override of the activity visibility mActivity.setForceInvisible(false); mActivityControlHelper.onQuickstepGestureStarted( curActivity, mWasLauncherAlreadyVisible); } Loading
src/com/android/launcher3/BaseActivity.java +20 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ public abstract class BaseActivity extends Activity { protected SystemUiController mSystemUiController; private boolean mStarted; // When the recents animation is running, the visibility of the Launcher is managed by the // animation private boolean mForceInvisible; private boolean mUserActive; public DeviceProfile getDeviceProfile() { Loading Loading @@ -100,6 +103,7 @@ public abstract class BaseActivity extends Activity { @Override protected void onStop() { mStarted = false; mForceInvisible = false; super.onStop(); } Loading @@ -125,6 +129,22 @@ public abstract class BaseActivity extends Activity { } } /** * Used to set the override visibility state, used only to handle the transition home with the * recents animation. * @see LauncherAppTransitionManagerImpl.getWallpaperOpenRunner() */ public void setForceInvisible(boolean invisible) { mForceInvisible = invisible; } /** * @return Wether this activity should be considered invisible regardless of actual visibility. */ public boolean isForceInvisible() { return mForceInvisible; } /** * Sets the device profile, adjusting it accordingly in case of multi-window */ Loading