Loading quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java +8 −7 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.view.ViewConfiguration; import android.view.WindowManager; import com.android.launcher3.R; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.util.Preconditions; import com.android.launcher3.util.RaceConditionTracker; import com.android.launcher3.util.TraceHelper; Loading Loading @@ -164,8 +165,10 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC // Proxy events to recents view if (mPassedDragSlop && mInteractionHandler != null && !mRecentsViewDispatcher.hasConsumer()) { mRecentsViewDispatcher.setConsumer(mInteractionHandler .getRecentsViewDispatcher(isNavBarOnLeft() || isNavBarOnRight())); mRecentsViewDispatcher.setConsumer(mInteractionHandler.getRecentsViewDispatcher( isNavBarOnLeft() ? RotationMode.SEASCAPE : (isNavBarOnRight() ? RotationMode.LANDSCAPE : RotationMode.NORMAL))); } int edgeFlags = ev.getEdgeFlags(); ev.setEdgeFlags(edgeFlags | EDGE_NAV_BAR); Loading Loading @@ -402,15 +405,13 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC } private float getDisplacement(MotionEvent ev) { final float displacement; if (isNavBarOnRight()) { displacement = ev.getX() - mDownPos.x; return ev.getX() - mDownPos.x; } else if (isNavBarOnLeft()) { displacement = mDownPos.x - ev.getX(); return mDownPos.x - ev.getX(); } else { displacement = ev.getY() - mDownPos.y; return ev.getY() - mDownPos.y; } return displacement; } @Override Loading quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +3 −2 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; Loading Loading @@ -533,8 +534,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> return TaskView.getCurveScaleForInterpolation(interpolation); } public Consumer<MotionEvent> getRecentsViewDispatcher(boolean isTransposed) { return mRecentsView != null ? mRecentsView.getEventDispatcher(isTransposed) : null; public Consumer<MotionEvent> getRecentsViewDispatcher(RotationMode rotationMode) { return mRecentsView != null ? mRecentsView.getEventDispatcher(rotationMode) : null; } @UiThread Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +4 −3 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PropertyListBuilder; import com.android.launcher3.anim.SpringObjectAnimator; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; Loading Loading @@ -1641,10 +1642,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl return mClearAllButton; } public Consumer<MotionEvent> getEventDispatcher(boolean isTransposed) { if (isTransposed) { public Consumer<MotionEvent> getEventDispatcher(RotationMode rotationMode) { if (rotationMode.isTransposed) { Matrix transform = new Matrix(); transform.setRotate(90); transform.setRotate(-rotationMode.surfaceRotation); if (getWidth() > 0 && getHeight() > 0) { float scale = ((float) getWidth()) / getHeight(); Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/OtherActivityInputConsumer.java +8 −7 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.view.ViewConfiguration; import android.view.WindowManager; import com.android.launcher3.R; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.util.Preconditions; import com.android.launcher3.util.RaceConditionTracker; import com.android.launcher3.util.TraceHelper; Loading Loading @@ -164,8 +165,10 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC // Proxy events to recents view if (mPassedDragSlop && mInteractionHandler != null && !mRecentsViewDispatcher.hasConsumer()) { mRecentsViewDispatcher.setConsumer(mInteractionHandler .getRecentsViewDispatcher(isNavBarOnLeft() || isNavBarOnRight())); mRecentsViewDispatcher.setConsumer(mInteractionHandler.getRecentsViewDispatcher( isNavBarOnLeft() ? RotationMode.SEASCAPE : (isNavBarOnRight() ? RotationMode.LANDSCAPE : RotationMode.NORMAL))); } int edgeFlags = ev.getEdgeFlags(); ev.setEdgeFlags(edgeFlags | EDGE_NAV_BAR); Loading Loading @@ -402,15 +405,13 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC } private float getDisplacement(MotionEvent ev) { final float displacement; if (isNavBarOnRight()) { displacement = ev.getX() - mDownPos.x; return ev.getX() - mDownPos.x; } else if (isNavBarOnLeft()) { displacement = mDownPos.x - ev.getX(); return mDownPos.x - ev.getX(); } else { displacement = ev.getY() - mDownPos.y; return ev.getY() - mDownPos.y; } return displacement; } @Override Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +3 −2 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; Loading Loading @@ -533,8 +534,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> return TaskView.getCurveScaleForInterpolation(interpolation); } public Consumer<MotionEvent> getRecentsViewDispatcher(boolean isTransposed) { return mRecentsView != null ? mRecentsView.getEventDispatcher(isTransposed) : null; public Consumer<MotionEvent> getRecentsViewDispatcher(RotationMode rotationMode) { return mRecentsView != null ? mRecentsView.getEventDispatcher(rotationMode) : null; } @UiThread Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +4 −3 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.PropertyListBuilder; import com.android.launcher3.anim.SpringObjectAnimator; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; Loading Loading @@ -1641,10 +1642,10 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl return mClearAllButton; } public Consumer<MotionEvent> getEventDispatcher(boolean isTransposed) { if (isTransposed) { public Consumer<MotionEvent> getEventDispatcher(RotationMode rotationMode) { if (rotationMode.isTransposed) { Matrix transform = new Matrix(); transform.setRotate(90); transform.setRotate(-rotationMode.surfaceRotation); if (getWidth() > 0 && getHeight() > 0) { float scale = ((float) getWidth()) / getHeight(); Loading