Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +11 −11 Original line number Diff line number Diff line Loading @@ -46,11 +46,8 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.util.VibratorWrapper; import com.android.launcher3.views.FloatingIconView; import com.android.quickstep.BaseActivityInterface.HomeAnimationFactory; Loading @@ -59,6 +56,7 @@ import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.ActivityInitListener; import com.android.quickstep.util.AppWindowAnimationHelper; import com.android.quickstep.util.AppWindowAnimationHelper.TransformParams; import com.android.quickstep.util.RecentsOrientedState; import com.android.quickstep.util.RectFSpringAnim; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; Loading Loading @@ -127,7 +125,7 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten protected boolean mCanceled; protected int mFinishingRecentsAnimationForNewTaskId = -1; private PagedViewOrientedState mOrientedState; private RecentsOrientedState mOrientedState; protected BaseSwipeUpHandler(Context context, RecentsAnimationDeviceState deviceState, GestureState gestureState, InputConsumerController inputConsumer) { Loading Loading @@ -350,9 +348,11 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten // TODO(b/150300347): The first recents animation after launcher is started with the // foreground app not in landscape will look funky until that bug is fixed displayRotation = mOrientedState.getDisplayRotation(); RectF tempRectF = new RectF(TEMP_RECT); mOrientedState.mapRectFromNormalOrientation(tempRectF, dp.widthPx, dp.heightPx); tempRectF.roundOut(TEMP_RECT); } RotationHelper.getTargetRectForRotation(TEMP_RECT, dp.widthPx, dp.heightPx, displayRotation); mAppWindowAnimationHelper.updateTargetRect(TEMP_RECT); if (mDeviceState.isFullyGesturalNavMode()) { // We can drag all the way to the top of the screen. Loading Loading @@ -447,7 +447,7 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten protected PagedOrientationHandler getOrientationHandler() { if (mOrientedState == null) { return new PortraitPagedViewHandler(); return PagedOrientationHandler.PORTRAIT; } return mOrientedState.getOrientationHandler(); } Loading @@ -468,8 +468,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten .setTargetSet(mRecentsAnimationTargets) .setLauncherOnTop(false))); if (isFloatingIconView) { RotationHelper.mapInverseRectFromNormalOrientation(startRect, mDp.widthPx, mDp.heightPx, mOrientedState.getDisplayRotation()); mOrientedState.mapInverseRectFromNormalOrientation( startRect, mDp.widthPx, mDp.heightPx); } RectFSpringAnim anim = new RectFSpringAnim(startRect, targetRect, mContext); if (isFloatingIconView) { Loading Loading @@ -500,8 +500,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten rotatedRect.set(currentRect); if (isFloatingIconView) { RotationHelper.mapRectFromNormalOrientation(rotatedRect, mDp.widthPx, mDp.heightPx, mOrientedState.getDisplayRotation()); mOrientedState.mapRectFromNormalOrientation( rotatedRect, mDp.widthPx, mDp.heightPx); mTransformParams.setCornerRadius(endRadius * progress + startRadius * (1f - progress)); } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityInterface.java +0 −2 Original line number Diff line number Diff line Loading @@ -33,8 +33,6 @@ import androidx.annotation.Nullable; import com.android.launcher3.DeviceProfile; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.util.ActivityInitListener; Loading quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java +2 −4 Original line number Diff line number Diff line Loading @@ -40,9 +40,7 @@ import android.view.MotionEvent; import com.android.launcher3.R; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.touch.LandscapePagedViewHandler; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.util.ObjectWrapper; import com.android.quickstep.BaseActivityInterface.HomeAnimationFactory; import com.android.quickstep.GestureState.GestureEndTarget; Loading Loading @@ -503,8 +501,8 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler<RecentsActivity, Fa PagedOrientationHandler orientationHandler = mRecentsView != null ? mRecentsView.getPagedOrientationHandler() : (mDp.isLandscape ? new LandscapePagedViewHandler() : new PortraitPagedViewHandler()); ? PagedOrientationHandler.LANDSCAPE : PagedOrientationHandler.PORTRAIT); return HomeAnimationFactory .getDefaultWindowTargetRect(orientationHandler, mDp); } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java +9 −10 Original line number Diff line number Diff line Loading @@ -15,6 +15,13 @@ */ package com.android.quickstep.util; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius; import static com.android.systemui.shared.system.QuickStepContract.supportsRoundedCornersOnWindows; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; import android.annotation.TargetApi; import android.content.Context; import android.content.res.Resources; Loading @@ -33,7 +40,6 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.RemoteAnimationTargets; import com.android.quickstep.SystemUiProxy; Loading @@ -47,13 +53,6 @@ import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat. import com.android.systemui.shared.system.TransactionCompat; import com.android.systemui.shared.system.WindowManagerWrapper; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius; import static com.android.systemui.shared.system.QuickStepContract.supportsRoundedCornersOnWindows; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; /** * Utility class to handle window clip animation */ Loading Loading @@ -86,7 +85,7 @@ public class AppWindowAnimationHelper { private final Rect mTmpRect = new Rect(); private final RectF mTmpRectF = new RectF(); private final RectF mCurrentRectWithInsets = new RectF(); private PagedViewOrientedState mOrientedState; private RecentsOrientedState mOrientedState; // Corner radius of windows, in pixels private final float mWindowCornerRadius; // Corner radius of windows when they're in overview mode. Loading @@ -105,7 +104,7 @@ public class AppWindowAnimationHelper { private TargetAlphaProvider mTaskAlphaCallback = (t, a) -> a; private TargetAlphaProvider mBaseAlphaCallback = (t, a) -> 1; public AppWindowAnimationHelper(PagedViewOrientedState orientedState, Context context) { public AppWindowAnimationHelper(RecentsOrientedState orientedState, Context context) { Resources res = context.getResources(); mOrientedState = orientedState; mWindowCornerRadius = getWindowCornerRadius(res); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java +0 −15 Original line number Diff line number Diff line Loading @@ -78,21 +78,6 @@ public class ClearAllButton extends Button implements PageCallbacks { } } public void onLayoutChanged() { if (mParent == null) { return; } setRotation(mParent.getPagedOrientationHandler().getDegreesRotated()); } public void setRtl(boolean rtl) { if (mIsRtl == rtl) { return; } mIsRtl = rtl; invalidate(); } public void setVisibilityAlpha(float alpha) { if (mVisibilityAlpha != alpha) { mVisibilityAlpha = alpha; Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +11 −11 Original line number Diff line number Diff line Loading @@ -46,11 +46,8 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.util.VibratorWrapper; import com.android.launcher3.views.FloatingIconView; import com.android.quickstep.BaseActivityInterface.HomeAnimationFactory; Loading @@ -59,6 +56,7 @@ import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.ActivityInitListener; import com.android.quickstep.util.AppWindowAnimationHelper; import com.android.quickstep.util.AppWindowAnimationHelper.TransformParams; import com.android.quickstep.util.RecentsOrientedState; import com.android.quickstep.util.RectFSpringAnim; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; Loading Loading @@ -127,7 +125,7 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten protected boolean mCanceled; protected int mFinishingRecentsAnimationForNewTaskId = -1; private PagedViewOrientedState mOrientedState; private RecentsOrientedState mOrientedState; protected BaseSwipeUpHandler(Context context, RecentsAnimationDeviceState deviceState, GestureState gestureState, InputConsumerController inputConsumer) { Loading Loading @@ -350,9 +348,11 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten // TODO(b/150300347): The first recents animation after launcher is started with the // foreground app not in landscape will look funky until that bug is fixed displayRotation = mOrientedState.getDisplayRotation(); RectF tempRectF = new RectF(TEMP_RECT); mOrientedState.mapRectFromNormalOrientation(tempRectF, dp.widthPx, dp.heightPx); tempRectF.roundOut(TEMP_RECT); } RotationHelper.getTargetRectForRotation(TEMP_RECT, dp.widthPx, dp.heightPx, displayRotation); mAppWindowAnimationHelper.updateTargetRect(TEMP_RECT); if (mDeviceState.isFullyGesturalNavMode()) { // We can drag all the way to the top of the screen. Loading Loading @@ -447,7 +447,7 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten protected PagedOrientationHandler getOrientationHandler() { if (mOrientedState == null) { return new PortraitPagedViewHandler(); return PagedOrientationHandler.PORTRAIT; } return mOrientedState.getOrientationHandler(); } Loading @@ -468,8 +468,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten .setTargetSet(mRecentsAnimationTargets) .setLauncherOnTop(false))); if (isFloatingIconView) { RotationHelper.mapInverseRectFromNormalOrientation(startRect, mDp.widthPx, mDp.heightPx, mOrientedState.getDisplayRotation()); mOrientedState.mapInverseRectFromNormalOrientation( startRect, mDp.widthPx, mDp.heightPx); } RectFSpringAnim anim = new RectFSpringAnim(startRect, targetRect, mContext); if (isFloatingIconView) { Loading Loading @@ -500,8 +500,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten rotatedRect.set(currentRect); if (isFloatingIconView) { RotationHelper.mapRectFromNormalOrientation(rotatedRect, mDp.widthPx, mDp.heightPx, mOrientedState.getDisplayRotation()); mOrientedState.mapRectFromNormalOrientation( rotatedRect, mDp.widthPx, mDp.heightPx); mTransformParams.setCornerRadius(endRadius * progress + startRadius * (1f - progress)); } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityInterface.java +0 −2 Original line number Diff line number Diff line Loading @@ -33,8 +33,6 @@ import androidx.annotation.Nullable; import com.android.launcher3.DeviceProfile; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.util.ActivityInitListener; Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackSwipeHandler.java +2 −4 Original line number Diff line number Diff line Loading @@ -40,9 +40,7 @@ import android.view.MotionEvent; import com.android.launcher3.R; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.touch.LandscapePagedViewHandler; import com.android.launcher3.touch.PagedOrientationHandler; import com.android.launcher3.touch.PortraitPagedViewHandler; import com.android.launcher3.util.ObjectWrapper; import com.android.quickstep.BaseActivityInterface.HomeAnimationFactory; import com.android.quickstep.GestureState.GestureEndTarget; Loading Loading @@ -503,8 +501,8 @@ public class FallbackSwipeHandler extends BaseSwipeUpHandler<RecentsActivity, Fa PagedOrientationHandler orientationHandler = mRecentsView != null ? mRecentsView.getPagedOrientationHandler() : (mDp.isLandscape ? new LandscapePagedViewHandler() : new PortraitPagedViewHandler()); ? PagedOrientationHandler.LANDSCAPE : PagedOrientationHandler.PORTRAIT); return HomeAnimationFactory .getDefaultWindowTargetRect(orientationHandler, mDp); } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/util/AppWindowAnimationHelper.java +9 −10 Original line number Diff line number Diff line Loading @@ -15,6 +15,13 @@ */ package com.android.quickstep.util; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius; import static com.android.systemui.shared.system.QuickStepContract.supportsRoundedCornersOnWindows; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; import android.annotation.TargetApi; import android.content.Context; import android.content.res.Resources; Loading @@ -33,7 +40,6 @@ import com.android.launcher3.LauncherState; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.RemoteAnimationTargets; import com.android.quickstep.SystemUiProxy; Loading @@ -47,13 +53,6 @@ import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat. import com.android.systemui.shared.system.TransactionCompat; import com.android.systemui.shared.system.WindowManagerWrapper; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.systemui.shared.system.QuickStepContract.getWindowCornerRadius; import static com.android.systemui.shared.system.QuickStepContract.supportsRoundedCornersOnWindows; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING; import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING; /** * Utility class to handle window clip animation */ Loading Loading @@ -86,7 +85,7 @@ public class AppWindowAnimationHelper { private final Rect mTmpRect = new Rect(); private final RectF mTmpRectF = new RectF(); private final RectF mCurrentRectWithInsets = new RectF(); private PagedViewOrientedState mOrientedState; private RecentsOrientedState mOrientedState; // Corner radius of windows, in pixels private final float mWindowCornerRadius; // Corner radius of windows when they're in overview mode. Loading @@ -105,7 +104,7 @@ public class AppWindowAnimationHelper { private TargetAlphaProvider mTaskAlphaCallback = (t, a) -> a; private TargetAlphaProvider mBaseAlphaCallback = (t, a) -> 1; public AppWindowAnimationHelper(PagedViewOrientedState orientedState, Context context) { public AppWindowAnimationHelper(RecentsOrientedState orientedState, Context context) { Resources res = context.getResources(); mOrientedState = orientedState; mWindowCornerRadius = getWindowCornerRadius(res); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java +0 −15 Original line number Diff line number Diff line Loading @@ -78,21 +78,6 @@ public class ClearAllButton extends Button implements PageCallbacks { } } public void onLayoutChanged() { if (mParent == null) { return; } setRotation(mParent.getPagedOrientationHandler().getDegreesRotated()); } public void setRtl(boolean rtl) { if (mIsRtl == rtl) { return; } mIsRtl = rtl; invalidate(); } public void setVisibilityAlpha(float alpha) { if (mVisibilityAlpha != alpha) { mVisibilityAlpha = alpha; Loading