Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +8 −2 Original line number Diff line number Diff line Loading @@ -28,9 +28,13 @@ import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW; import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD; import android.view.MotionEvent; import androidx.annotation.Nullable; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager; Loading @@ -45,8 +49,6 @@ import com.android.quickstep.SysUINavigationMode.Mode; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import androidx.annotation.Nullable; /** * Handles quick switching to a recent task from the home screen. */ Loading Loading @@ -128,6 +130,10 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll private void updateFullscreenProgress(float progress) { if (mTaskToLaunch != null) { mTaskToLaunch.setFullscreenProgress(progress); int sysuiFlags = progress > UPDATE_SYSUI_FLAGS_THRESHOLD ? mTaskToLaunch.getThumbnail().getSysUiStatusNavFlags() : 0; mLauncher.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags); } } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -270,9 +270,9 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe playScaleDownAnim(anim, activity, endState); anim.setDuration(transitionLength * 2); activity.getStateManager().setCurrentAnimation(anim); AnimatorPlaybackController controller = AnimatorPlaybackController.wrap(anim, transitionLength * 2); activity.getStateManager().setCurrentUserControlledAnimation(controller); // Since we are changing the start position of the UI, reapply the state, at the end controller.setEndAction(() -> { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +15 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TI import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS; import static com.android.launcher3.util.RaceConditionTracker.ENTER; import static com.android.launcher3.util.RaceConditionTracker.EXIT; import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; import static com.android.quickstep.ActivityControlHelper.AnimationFactory.ShelfAnimState.HIDE; import static com.android.quickstep.ActivityControlHelper.AnimationFactory.ShelfAnimState.PEEK; Loading Loading @@ -654,8 +655,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> mTransformParams.setProgress(shift).setOffsetX(offsetX).setOffsetScale(offsetScale); mClipAnimationHelper.applyTransform(mRecentsAnimationWrapper.targetSet, mTransformParams); mRecentsAnimationWrapper.setWindowThresholdCrossed( shift > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD); updateSysUiFlags(shift); } if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { Loading Loading @@ -700,6 +700,18 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> ? 0 : (progress - mShiftAtGestureStart) / (1 - mShiftAtGestureStart)); } private void updateSysUiFlags(float windowProgress) { if (mRecentsView != null) { // We will handle the sysui flags based on the centermost task view. mRecentsAnimationWrapper.setWindowThresholdCrossed(true); int sysuiFlags = windowProgress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD ? 0 : mRecentsView.getTaskViewAt(mRecentsView.getPageNearestToCenterOfScreen()) .getThumbnail().getSysUiStatusNavFlags(); mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags); } } @Override public void onRecentsAnimationStart(SwipeAnimationTargetSet targetSet) { DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext); Loading Loading @@ -1091,6 +1103,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> windowAlphaThreshold, mClipAnimationHelper.getCurrentCornerRadius(), false); } updateSysUiFlags(Math.max(progress, mCurrentShift.value)); }); anim.addAnimatorListener(new AnimationSuccessListener() { @Override Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +8 −2 Original line number Diff line number Diff line Loading @@ -28,9 +28,13 @@ import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW; import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD; import android.view.MotionEvent; import androidx.annotation.Nullable; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager; Loading @@ -45,8 +49,6 @@ import com.android.quickstep.SysUINavigationMode.Mode; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import androidx.annotation.Nullable; /** * Handles quick switching to a recent task from the home screen. */ Loading Loading @@ -128,6 +130,10 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll private void updateFullscreenProgress(float progress) { if (mTaskToLaunch != null) { mTaskToLaunch.setFullscreenProgress(progress); int sysuiFlags = progress > UPDATE_SYSUI_FLAGS_THRESHOLD ? mTaskToLaunch.getThumbnail().getSysUiStatusNavFlags() : 0; mLauncher.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags); } } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -270,9 +270,9 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe playScaleDownAnim(anim, activity, endState); anim.setDuration(transitionLength * 2); activity.getStateManager().setCurrentAnimation(anim); AnimatorPlaybackController controller = AnimatorPlaybackController.wrap(anim, transitionLength * 2); activity.getStateManager().setCurrentUserControlledAnimation(controller); // Since we are changing the start position of the UI, reapply the state, at the end controller.setEndAction(() -> { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +15 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TI import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS; import static com.android.launcher3.util.RaceConditionTracker.ENTER; import static com.android.launcher3.util.RaceConditionTracker.EXIT; import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW; import static com.android.launcher3.views.FloatingIconView.SHAPE_PROGRESS_DURATION; import static com.android.quickstep.ActivityControlHelper.AnimationFactory.ShelfAnimState.HIDE; import static com.android.quickstep.ActivityControlHelper.AnimationFactory.ShelfAnimState.PEEK; Loading Loading @@ -654,8 +655,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> mTransformParams.setProgress(shift).setOffsetX(offsetX).setOffsetScale(offsetScale); mClipAnimationHelper.applyTransform(mRecentsAnimationWrapper.targetSet, mTransformParams); mRecentsAnimationWrapper.setWindowThresholdCrossed( shift > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD); updateSysUiFlags(shift); } if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { Loading Loading @@ -700,6 +700,18 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> ? 0 : (progress - mShiftAtGestureStart) / (1 - mShiftAtGestureStart)); } private void updateSysUiFlags(float windowProgress) { if (mRecentsView != null) { // We will handle the sysui flags based on the centermost task view. mRecentsAnimationWrapper.setWindowThresholdCrossed(true); int sysuiFlags = windowProgress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD ? 0 : mRecentsView.getTaskViewAt(mRecentsView.getPageNearestToCenterOfScreen()) .getThumbnail().getSysUiStatusNavFlags(); mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags); } } @Override public void onRecentsAnimationStart(SwipeAnimationTargetSet targetSet) { DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext); Loading Loading @@ -1091,6 +1103,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> windowAlphaThreshold, mClipAnimationHelper.getCurrentCornerRadius(), false); } updateSysUiFlags(Math.max(progress, mCurrentShift.value)); }); anim.addAnimatorListener(new AnimationSuccessListener() { @Override Loading