Loading quickstep/src/com/android/quickstep/views/RecentsView.java +9 −4 Original line number Diff line number Diff line Loading @@ -383,7 +383,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private static final float ANIMATION_DISMISS_PROGRESS_MIDPOINT = 0.5f; private static final float END_DISMISS_TRANSLATION_INTERPOLATION_OFFSET = 0.75f; private static final float SIGNIFICANT_MOVE_THRESHOLD_TABLET = 0.15f; private static final float SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE = 0.15f; protected final RecentsOrientedState mOrientationState; protected final BaseActivityInterface<STATE_TYPE, ACTIVITY_TYPE> mSizeStrategy; Loading Loading @@ -1195,9 +1195,14 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } @Override protected float getSignificantMoveThreshold() { return mActivity.getDeviceProfile().isTablet ? SIGNIFICANT_MOVE_THRESHOLD_TABLET : super.getSignificantMoveThreshold(); protected boolean isSignificantMove(float absoluteDelta, int pageOrientedSize) { DeviceProfile deviceProfile = mActivity.getDeviceProfile(); if (!deviceProfile.isTablet) { return super.isSignificantMove(absoluteDelta, pageOrientedSize); } return absoluteDelta > deviceProfile.availableWidthPx * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE; } @Override Loading src/com/android/launcher3/PagedView.java +7 −8 Original line number Diff line number Diff line Loading @@ -1195,8 +1195,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou mAllowOverScroll = enable; } protected float getSignificantMoveThreshold() { return SIGNIFICANT_MOVE_THRESHOLD; protected boolean isSignificantMove(float absoluteDelta, int pageOrientedSize) { return absoluteDelta > pageOrientedSize * SIGNIFICANT_MOVE_THRESHOLD; } @Override Loading Loading @@ -1324,11 +1324,10 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou int velocity = (int) mOrientationHandler.getPrimaryVelocity(velocityTracker, mActivePointerId); float delta = primaryDirection - mDownMotionPrimary; delta /= mOrientationHandler.getPrimaryScale(this); int pageOrientedSize = mOrientationHandler.getMeasuredSize(getPageAt(mCurrentPage)); boolean isSignificantMove = Math.abs(delta) > pageOrientedSize * getSignificantMoveThreshold(); int pageOrientedSize = (int) (mOrientationHandler.getMeasuredSize( getPageAt(mCurrentPage)) * mOrientationHandler.getPrimaryScale(this)); boolean isSignificantMove = isSignificantMove(Math.abs(delta), pageOrientedSize); mTotalMotion += Math.abs(mLastMotion + mLastMotionRemainder - primaryDirection); boolean passedSlop = mAllowEasyFling || mTotalMotion > mPageSlop; Loading src/com/android/launcher3/Workspace.java +13 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,8 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> * {@link #isFinishedSwitchingState()} ()} to return true. */ private static final float FINISHED_SWITCHING_STATE_TRANSITION_PROGRESS = 0.5f; private static final float SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE = 0.15f; private static final boolean ENFORCE_DRAG_EVENT_ORDER = false; private static final int ADJACENT_SCREEN_DROP_DURATION = 300; Loading Loading @@ -3410,6 +3412,17 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> return getContext().getString(R.string.workspace_scroll_format, currentPage, totalPages); } @Override protected boolean isSignificantMove(float absoluteDelta, int pageOrientedSize) { DeviceProfile deviceProfile = mLauncher.getDeviceProfile(); if (!deviceProfile.isTablet) { return super.isSignificantMove(absoluteDelta, pageOrientedSize); } return absoluteDelta > deviceProfile.availableWidthPx * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE; } /** * Used as a workaround to ensure that the AppWidgetService receives the * PACKAGE_ADDED broadcast before updating widgets. Loading Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +9 −4 Original line number Diff line number Diff line Loading @@ -383,7 +383,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private static final float ANIMATION_DISMISS_PROGRESS_MIDPOINT = 0.5f; private static final float END_DISMISS_TRANSLATION_INTERPOLATION_OFFSET = 0.75f; private static final float SIGNIFICANT_MOVE_THRESHOLD_TABLET = 0.15f; private static final float SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE = 0.15f; protected final RecentsOrientedState mOrientationState; protected final BaseActivityInterface<STATE_TYPE, ACTIVITY_TYPE> mSizeStrategy; Loading Loading @@ -1195,9 +1195,14 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } @Override protected float getSignificantMoveThreshold() { return mActivity.getDeviceProfile().isTablet ? SIGNIFICANT_MOVE_THRESHOLD_TABLET : super.getSignificantMoveThreshold(); protected boolean isSignificantMove(float absoluteDelta, int pageOrientedSize) { DeviceProfile deviceProfile = mActivity.getDeviceProfile(); if (!deviceProfile.isTablet) { return super.isSignificantMove(absoluteDelta, pageOrientedSize); } return absoluteDelta > deviceProfile.availableWidthPx * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE; } @Override Loading
src/com/android/launcher3/PagedView.java +7 −8 Original line number Diff line number Diff line Loading @@ -1195,8 +1195,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou mAllowOverScroll = enable; } protected float getSignificantMoveThreshold() { return SIGNIFICANT_MOVE_THRESHOLD; protected boolean isSignificantMove(float absoluteDelta, int pageOrientedSize) { return absoluteDelta > pageOrientedSize * SIGNIFICANT_MOVE_THRESHOLD; } @Override Loading Loading @@ -1324,11 +1324,10 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou int velocity = (int) mOrientationHandler.getPrimaryVelocity(velocityTracker, mActivePointerId); float delta = primaryDirection - mDownMotionPrimary; delta /= mOrientationHandler.getPrimaryScale(this); int pageOrientedSize = mOrientationHandler.getMeasuredSize(getPageAt(mCurrentPage)); boolean isSignificantMove = Math.abs(delta) > pageOrientedSize * getSignificantMoveThreshold(); int pageOrientedSize = (int) (mOrientationHandler.getMeasuredSize( getPageAt(mCurrentPage)) * mOrientationHandler.getPrimaryScale(this)); boolean isSignificantMove = isSignificantMove(Math.abs(delta), pageOrientedSize); mTotalMotion += Math.abs(mLastMotion + mLastMotionRemainder - primaryDirection); boolean passedSlop = mAllowEasyFling || mTotalMotion > mPageSlop; Loading
src/com/android/launcher3/Workspace.java +13 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,8 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> * {@link #isFinishedSwitchingState()} ()} to return true. */ private static final float FINISHED_SWITCHING_STATE_TRANSITION_PROGRESS = 0.5f; private static final float SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE = 0.15f; private static final boolean ENFORCE_DRAG_EVENT_ORDER = false; private static final int ADJACENT_SCREEN_DROP_DURATION = 300; Loading Loading @@ -3410,6 +3412,17 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> return getContext().getString(R.string.workspace_scroll_format, currentPage, totalPages); } @Override protected boolean isSignificantMove(float absoluteDelta, int pageOrientedSize) { DeviceProfile deviceProfile = mLauncher.getDeviceProfile(); if (!deviceProfile.isTablet) { return super.isSignificantMove(absoluteDelta, pageOrientedSize); } return absoluteDelta > deviceProfile.availableWidthPx * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE; } /** * Used as a workaround to ensure that the AppWidgetService receives the * PACKAGE_ADDED broadcast before updating widgets. Loading