Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java +8 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.launcher3.uioverrides; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS; import android.content.Context; import android.graphics.Rect; Loading Loading @@ -48,6 +49,7 @@ import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.SysUINavigationMode.Mode; import com.android.quickstep.TouchInteractionService; import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.WindowManagerWrapper; import java.util.ArrayList; Loading Loading @@ -208,6 +210,12 @@ public abstract class RecentsUiFactory { } } /** Closes system windows. */ public static void closeSystemWindows() { ActivityManagerWrapper.getInstance() .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS); } private static final class LauncherTaskViewController extends TaskViewTouchController<Launcher> { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +6 −1 Original line number Diff line number Diff line Loading @@ -386,6 +386,10 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten // rounding at the end of the animation. float startRadius = mClipAnimationHelper.getCurrentCornerRadius(); float endRadius = startRect.width() / 6f; float startTransformProgress = mTransformParams.getProgress(); float endTransformProgress = 1; // We want the window alpha to be 0 once this threshold is met, so that the // FolderIconView can be seen morphing into the icon shape. final float windowAlphaThreshold = isFloatingIconView ? 1f - SHAPE_PROGRESS_DURATION : 1f; Loading @@ -409,7 +413,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten public void onUpdate(RectF currentRect, float progress) { homeAnim.setPlayFraction(progress); mTransformParams.setProgress(progress) mTransformParams.setProgress( Utilities.mapRange(progress, startTransformProgress, endTransformProgress)) .setCurrentRectAndTargetAlpha(currentRect, getWindowAlpha(progress)); if (isFloatingIconView) { mTransformParams.setCornerRadius(endRadius * progress + startRadius Loading quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +13 −4 Original line number Diff line number Diff line Loading @@ -563,9 +563,13 @@ public class TouchInteractionService extends Service implements // not interrupt it. QuickSwitch assumes that interruption can only happen if the // next gesture is also quick switch. mUncheckedConsumer = new AssistantTouchConsumer(this, mISystemUiProxy, new AssistantTouchConsumer( this, mISystemUiProxy, mOverviewComponentObserver.getActivityControlHelper(), InputConsumer.NO_OP, mInputMonitorCompat); InputConsumer.NO_OP, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } else { mUncheckedConsumer = InputConsumer.NO_OP; } Loading Loading @@ -612,8 +616,13 @@ public class TouchInteractionService extends Service implements final ActivityControlHelper activityControl = mOverviewComponentObserver.getActivityControlHelper(); if (canTriggerAssistantAction(event)) { base = new AssistantTouchConsumer(this, mISystemUiProxy, activityControl, base, mInputMonitorCompat); base = new AssistantTouchConsumer( this, mISystemUiProxy, activityControl, base, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } if ((mSystemUiStateFlags & SYSUI_STATE_SCREEN_PINNING) != 0) { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java +8 −5 Original line number Diff line number Diff line Loading @@ -91,14 +91,16 @@ public class AssistantTouchConsumer extends DelegateInputConsumer { private final ISystemUiProxy mSysUiProxy; private final Context mContext; private final GestureDetector mGestureDetector; private final boolean mIsAssistGestureConstrained; public AssistantTouchConsumer(Context context, ISystemUiProxy systemUiProxy, ActivityControlHelper activityControlHelper, InputConsumer delegate, InputMonitorCompat inputMonitor) { InputMonitorCompat inputMonitor, boolean isAssistGestureConstrained) { super(delegate, inputMonitor); final Resources res = context.getResources(); mContext = context; mSysUiProxy = systemUiProxy; mIsAssistGestureConstrained = isAssistGestureConstrained; mDragDistThreshold = res.getDimension(R.dimen.gestures_assistant_drag_threshold); mFlingDistThreshold = res.getDimension(R.dimen.gestures_assistant_fling_threshold); mTimeThreshold = res.getInteger(R.integer.assistant_gesture_min_time_threshold); Loading Loading @@ -273,7 +275,8 @@ public class AssistantTouchConsumer extends DelegateInputConsumer { private class AssistantGestureListener extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (isValidAssistantGestureAngle(velocityX, -velocityY) if (!mIsAssistGestureConstrained && isValidAssistantGestureAngle(velocityX, -velocityY) && mDistance >= mFlingDistThreshold && !mLaunchedAssistant && mState != STATE_DELEGATE_ACTIVE) { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java +4 −0 Original line number Diff line number Diff line Loading @@ -402,6 +402,10 @@ public class ClipAnimationHelper { return this; } public float getProgress() { return progress; } public TransformParams setCornerRadius(float cornerRadius) { this.cornerRadius = cornerRadius; return this; Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java +8 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.launcher3.uioverrides; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS; import android.content.Context; import android.graphics.Rect; Loading Loading @@ -48,6 +49,7 @@ import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.SysUINavigationMode.Mode; import com.android.quickstep.TouchInteractionService; import com.android.quickstep.views.RecentsView; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.WindowManagerWrapper; import java.util.ArrayList; Loading Loading @@ -208,6 +210,12 @@ public abstract class RecentsUiFactory { } } /** Closes system windows. */ public static void closeSystemWindows() { ActivityManagerWrapper.getInstance() .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS); } private static final class LauncherTaskViewController extends TaskViewTouchController<Launcher> { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +6 −1 Original line number Diff line number Diff line Loading @@ -386,6 +386,10 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten // rounding at the end of the animation. float startRadius = mClipAnimationHelper.getCurrentCornerRadius(); float endRadius = startRect.width() / 6f; float startTransformProgress = mTransformParams.getProgress(); float endTransformProgress = 1; // We want the window alpha to be 0 once this threshold is met, so that the // FolderIconView can be seen morphing into the icon shape. final float windowAlphaThreshold = isFloatingIconView ? 1f - SHAPE_PROGRESS_DURATION : 1f; Loading @@ -409,7 +413,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten public void onUpdate(RectF currentRect, float progress) { homeAnim.setPlayFraction(progress); mTransformParams.setProgress(progress) mTransformParams.setProgress( Utilities.mapRange(progress, startTransformProgress, endTransformProgress)) .setCurrentRectAndTargetAlpha(currentRect, getWindowAlpha(progress)); if (isFloatingIconView) { mTransformParams.setCornerRadius(endRadius * progress + startRadius Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +13 −4 Original line number Diff line number Diff line Loading @@ -563,9 +563,13 @@ public class TouchInteractionService extends Service implements // not interrupt it. QuickSwitch assumes that interruption can only happen if the // next gesture is also quick switch. mUncheckedConsumer = new AssistantTouchConsumer(this, mISystemUiProxy, new AssistantTouchConsumer( this, mISystemUiProxy, mOverviewComponentObserver.getActivityControlHelper(), InputConsumer.NO_OP, mInputMonitorCompat); InputConsumer.NO_OP, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } else { mUncheckedConsumer = InputConsumer.NO_OP; } Loading Loading @@ -612,8 +616,13 @@ public class TouchInteractionService extends Service implements final ActivityControlHelper activityControl = mOverviewComponentObserver.getActivityControlHelper(); if (canTriggerAssistantAction(event)) { base = new AssistantTouchConsumer(this, mISystemUiProxy, activityControl, base, mInputMonitorCompat); base = new AssistantTouchConsumer( this, mISystemUiProxy, activityControl, base, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } if ((mSystemUiStateFlags & SYSUI_STATE_SCREEN_PINNING) != 0) { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantTouchConsumer.java +8 −5 Original line number Diff line number Diff line Loading @@ -91,14 +91,16 @@ public class AssistantTouchConsumer extends DelegateInputConsumer { private final ISystemUiProxy mSysUiProxy; private final Context mContext; private final GestureDetector mGestureDetector; private final boolean mIsAssistGestureConstrained; public AssistantTouchConsumer(Context context, ISystemUiProxy systemUiProxy, ActivityControlHelper activityControlHelper, InputConsumer delegate, InputMonitorCompat inputMonitor) { InputMonitorCompat inputMonitor, boolean isAssistGestureConstrained) { super(delegate, inputMonitor); final Resources res = context.getResources(); mContext = context; mSysUiProxy = systemUiProxy; mIsAssistGestureConstrained = isAssistGestureConstrained; mDragDistThreshold = res.getDimension(R.dimen.gestures_assistant_drag_threshold); mFlingDistThreshold = res.getDimension(R.dimen.gestures_assistant_fling_threshold); mTimeThreshold = res.getInteger(R.integer.assistant_gesture_min_time_threshold); Loading Loading @@ -273,7 +275,8 @@ public class AssistantTouchConsumer extends DelegateInputConsumer { private class AssistantGestureListener extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (isValidAssistantGestureAngle(velocityX, -velocityY) if (!mIsAssistGestureConstrained && isValidAssistantGestureAngle(velocityX, -velocityY) && mDistance >= mFlingDistThreshold && !mLaunchedAssistant && mState != STATE_DELEGATE_ACTIVE) { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java +4 −0 Original line number Diff line number Diff line Loading @@ -402,6 +402,10 @@ public class ClipAnimationHelper { return this; } public float getProgress() { return progress; } public TransformParams setCornerRadius(float cornerRadius) { this.cornerRadius = cornerRadius; return this; Loading