Loading quickstep/src/com/android/quickstep/views/OverviewActionsView.java +3 −1 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo HIDDEN_NON_ZERO_ROTATION, HIDDEN_NO_TASKS, HIDDEN_NO_RECENTS, HIDDEN_FOCUSED_SCROLL, HIDDEN_SPLIT_SCREEN}) @Retention(RetentionPolicy.SOURCE) public @interface ActionsHiddenFlags { } Loading @@ -65,7 +66,8 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo public static final int HIDDEN_NON_ZERO_ROTATION = 1 << 0; public static final int HIDDEN_NO_TASKS = 1 << 1; public static final int HIDDEN_NO_RECENTS = 1 << 2; public static final int HIDDEN_SPLIT_SCREEN = 1 << 3; public static final int HIDDEN_FOCUSED_SCROLL = 1 << 3; public static final int HIDDEN_SPLIT_SCREEN = 1 << 4; @IntDef(flag = true, value = { DISABLED_SCROLLING, Loading quickstep/src/com/android/quickstep/views/RecentsView.java +15 −33 Original line number Diff line number Diff line Loading @@ -376,8 +376,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // OverScroll constants private static final int OVERSCROLL_PAGE_SNAP_ANIMATION_DURATION = 270; private static final int DEFAULT_ACTIONS_VIEW_ALPHA_ANIMATION_DURATION = 300; private static final int DISMISS_TASK_DURATION = 300; private static final int ADDITION_TASK_DURATION = 200; private static final float INITIAL_DISMISS_TRANSLATION_INTERPOLATION_OFFSET = 0.55f; Loading Loading @@ -651,8 +649,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private TaskView mMovingTaskView; private OverviewActionsView mActionsView; private ObjectAnimator mActionsViewAlphaAnimator; private float mActionsViewAlphaAnimatorFinalValue; private MultiWindowModeChangedListener mMultiWindowModeChangedListener = new MultiWindowModeChangedListener() { Loading Loading @@ -1138,11 +1134,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T return getScrollForPage(taskIndex) == getPagedOrientationHandler().getPrimaryScroll(this); } private boolean isFocusedTaskInExpectedScrollPosition() { TaskView focusedTask = getFocusedTaskView(); return focusedTask != null && isTaskInExpectedScrollPosition(indexOfChild(focusedTask)); } /** * Returns a {@link TaskView} that has taskId matching {@code taskId} or null if no match. */ Loading Loading @@ -1189,15 +1180,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T @Override protected void onPageBeginTransition() { super.onPageBeginTransition(); if (!mActivity.getDeviceProfile().isTablet) { mActionsView.updateDisabledFlags(OverviewActionsView.DISABLED_SCROLLING, true); } } @Override protected void onPageEndTransition() { super.onPageEndTransition(); if (isClearAllHidden() && !mActivity.getDeviceProfile().isTablet) { if (isClearAllHidden()) { mActionsView.updateDisabledFlags(OverviewActionsView.DISABLED_SCROLLING, false); } if (getNextPage() > 0) { Loading Loading @@ -1798,24 +1787,16 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } private void updateActionsViewFocusedScroll() { boolean hiddenFocusedScroll; if (showAsGrid()) { float actionsViewAlphaValue = isFocusedTaskInExpectedScrollPosition() ? 1 : 0; // If animation is already in progress towards the same end value, do not restart. if (mActionsViewAlphaAnimator == null || !mActionsViewAlphaAnimator.isStarted() || (mActionsViewAlphaAnimator.isStarted() && mActionsViewAlphaAnimatorFinalValue != actionsViewAlphaValue)) { animateActionsViewAlpha(actionsViewAlphaValue, DEFAULT_ACTIONS_VIEW_ALPHA_ANIMATION_DURATION); } } TaskView focusedTaskView = getFocusedTaskView(); hiddenFocusedScroll = focusedTaskView == null || !isTaskInExpectedScrollPosition(indexOfChild(focusedTaskView)); } else { hiddenFocusedScroll = false; } private void animateActionsViewAlpha(float alphaValue, long duration) { mActionsViewAlphaAnimator = ObjectAnimator.ofFloat( mActionsView.getVisibilityAlpha(), MultiValueAlpha.VALUE, alphaValue); mActionsViewAlphaAnimatorFinalValue = alphaValue; mActionsViewAlphaAnimator.setDuration(duration); mActionsViewAlphaAnimator.start(); mActionsView.updateHiddenFlags(OverviewActionsView.HIDDEN_FOCUSED_SCROLL, hiddenFocusedScroll); } /** Loading Loading @@ -2346,9 +2327,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } private void animateActionsViewIn() { if (!showAsGrid() || isFocusedTaskInExpectedScrollPosition()) { animateActionsViewAlpha(1, TaskView.SCALE_ICON_DURATION); } ObjectAnimator anim = ObjectAnimator.ofFloat( mActionsView.getVisibilityAlpha(), MultiValueAlpha.VALUE, 0, 1); anim.setDuration(TaskView.SCALE_ICON_DURATION); anim.start(); } public void animateUpTaskIconScale() { Loading Loading @@ -3284,7 +3266,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // Update various scroll-dependent UI. dispatchScrollChanged(); updateActionsViewFocusedScroll(); if (isClearAllHidden() && !mActivity.getDeviceProfile().isTablet) { if (isClearAllHidden()) { mActionsView.updateDisabledFlags(OverviewActionsView.DISABLED_SCROLLING, false); } Loading Loading
quickstep/src/com/android/quickstep/views/OverviewActionsView.java +3 −1 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo HIDDEN_NON_ZERO_ROTATION, HIDDEN_NO_TASKS, HIDDEN_NO_RECENTS, HIDDEN_FOCUSED_SCROLL, HIDDEN_SPLIT_SCREEN}) @Retention(RetentionPolicy.SOURCE) public @interface ActionsHiddenFlags { } Loading @@ -65,7 +66,8 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo public static final int HIDDEN_NON_ZERO_ROTATION = 1 << 0; public static final int HIDDEN_NO_TASKS = 1 << 1; public static final int HIDDEN_NO_RECENTS = 1 << 2; public static final int HIDDEN_SPLIT_SCREEN = 1 << 3; public static final int HIDDEN_FOCUSED_SCROLL = 1 << 3; public static final int HIDDEN_SPLIT_SCREEN = 1 << 4; @IntDef(flag = true, value = { DISABLED_SCROLLING, Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +15 −33 Original line number Diff line number Diff line Loading @@ -376,8 +376,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // OverScroll constants private static final int OVERSCROLL_PAGE_SNAP_ANIMATION_DURATION = 270; private static final int DEFAULT_ACTIONS_VIEW_ALPHA_ANIMATION_DURATION = 300; private static final int DISMISS_TASK_DURATION = 300; private static final int ADDITION_TASK_DURATION = 200; private static final float INITIAL_DISMISS_TRANSLATION_INTERPOLATION_OFFSET = 0.55f; Loading Loading @@ -651,8 +649,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private TaskView mMovingTaskView; private OverviewActionsView mActionsView; private ObjectAnimator mActionsViewAlphaAnimator; private float mActionsViewAlphaAnimatorFinalValue; private MultiWindowModeChangedListener mMultiWindowModeChangedListener = new MultiWindowModeChangedListener() { Loading Loading @@ -1138,11 +1134,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T return getScrollForPage(taskIndex) == getPagedOrientationHandler().getPrimaryScroll(this); } private boolean isFocusedTaskInExpectedScrollPosition() { TaskView focusedTask = getFocusedTaskView(); return focusedTask != null && isTaskInExpectedScrollPosition(indexOfChild(focusedTask)); } /** * Returns a {@link TaskView} that has taskId matching {@code taskId} or null if no match. */ Loading Loading @@ -1189,15 +1180,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T @Override protected void onPageBeginTransition() { super.onPageBeginTransition(); if (!mActivity.getDeviceProfile().isTablet) { mActionsView.updateDisabledFlags(OverviewActionsView.DISABLED_SCROLLING, true); } } @Override protected void onPageEndTransition() { super.onPageEndTransition(); if (isClearAllHidden() && !mActivity.getDeviceProfile().isTablet) { if (isClearAllHidden()) { mActionsView.updateDisabledFlags(OverviewActionsView.DISABLED_SCROLLING, false); } if (getNextPage() > 0) { Loading Loading @@ -1798,24 +1787,16 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } private void updateActionsViewFocusedScroll() { boolean hiddenFocusedScroll; if (showAsGrid()) { float actionsViewAlphaValue = isFocusedTaskInExpectedScrollPosition() ? 1 : 0; // If animation is already in progress towards the same end value, do not restart. if (mActionsViewAlphaAnimator == null || !mActionsViewAlphaAnimator.isStarted() || (mActionsViewAlphaAnimator.isStarted() && mActionsViewAlphaAnimatorFinalValue != actionsViewAlphaValue)) { animateActionsViewAlpha(actionsViewAlphaValue, DEFAULT_ACTIONS_VIEW_ALPHA_ANIMATION_DURATION); } } TaskView focusedTaskView = getFocusedTaskView(); hiddenFocusedScroll = focusedTaskView == null || !isTaskInExpectedScrollPosition(indexOfChild(focusedTaskView)); } else { hiddenFocusedScroll = false; } private void animateActionsViewAlpha(float alphaValue, long duration) { mActionsViewAlphaAnimator = ObjectAnimator.ofFloat( mActionsView.getVisibilityAlpha(), MultiValueAlpha.VALUE, alphaValue); mActionsViewAlphaAnimatorFinalValue = alphaValue; mActionsViewAlphaAnimator.setDuration(duration); mActionsViewAlphaAnimator.start(); mActionsView.updateHiddenFlags(OverviewActionsView.HIDDEN_FOCUSED_SCROLL, hiddenFocusedScroll); } /** Loading Loading @@ -2346,9 +2327,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } private void animateActionsViewIn() { if (!showAsGrid() || isFocusedTaskInExpectedScrollPosition()) { animateActionsViewAlpha(1, TaskView.SCALE_ICON_DURATION); } ObjectAnimator anim = ObjectAnimator.ofFloat( mActionsView.getVisibilityAlpha(), MultiValueAlpha.VALUE, 0, 1); anim.setDuration(TaskView.SCALE_ICON_DURATION); anim.start(); } public void animateUpTaskIconScale() { Loading Loading @@ -3284,7 +3266,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T // Update various scroll-dependent UI. dispatchScrollChanged(); updateActionsViewFocusedScroll(); if (isClearAllHidden() && !mActivity.getDeviceProfile().isTablet) { if (isClearAllHidden()) { mActionsView.updateDisabledFlags(OverviewActionsView.DISABLED_SCROLLING, false); } Loading