Loading src/com/android/launcher3/Launcher.java +1 −0 Original line number Diff line number Diff line Loading @@ -3039,6 +3039,7 @@ public class Launcher extends StatefulActivity<LauncherState> return mPopupDataProvider.getDotInfoForItem(info); } @NonNull public LauncherOverlayManager getOverlayManager() { return mOverlayManager; } Loading src/com/android/launcher3/PagedView.java +11 −0 Original line number Diff line number Diff line Loading @@ -1463,6 +1463,15 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou mEdgeGlowLeft.onFlingVelocity(velocity); mEdgeGlowRight.onFlingVelocity(velocity); } // Detect if user tries to swipe to -1 page but gets disallowed by checking if there was // left-over values in mEdgeGlowLeft (or mEdgeGlowRight in RLT). final int layoutDir = getLayoutDirection(); if ((mEdgeGlowLeft.getDistance() > 0 && layoutDir == LAYOUT_DIRECTION_LTR) || (mEdgeGlowRight.getDistance() > 0 && layoutDir == LAYOUT_DIRECTION_RTL)) { onDisallowSwipeToMinusOnePage(); } mEdgeGlowLeft.onRelease(ev); mEdgeGlowRight.onRelease(ev); // End any intermediate reordering states Loading @@ -1487,6 +1496,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou return true; } protected void onDisallowSwipeToMinusOnePage() {} protected void onNotSnappingToPageInFreeScroll() { } /** Loading src/com/android/launcher3/Workspace.java +5 −0 Original line number Diff line number Diff line Loading @@ -1123,6 +1123,11 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> return super.onTouchEvent(ev); } @Override protected void onDisallowSwipeToMinusOnePage() { mLauncher.getOverlayManager().onDisallowSwipeToMinusOnePage(); } /** * Called directly from a CellLayout (not by the framework), after we've been added as a * listener via setOnInterceptTouchEventListener(). This allows us to tell the CellLayout Loading src_plugins/com/android/systemui/plugins/shared/LauncherOverlayManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ public interface LauncherOverlayManager { default void onActivityDestroyed() { } default void onDisallowSwipeToMinusOnePage() {} /** * @deprecated use LauncherOverlayTouchProxy directly */ Loading Loading
src/com/android/launcher3/Launcher.java +1 −0 Original line number Diff line number Diff line Loading @@ -3039,6 +3039,7 @@ public class Launcher extends StatefulActivity<LauncherState> return mPopupDataProvider.getDotInfoForItem(info); } @NonNull public LauncherOverlayManager getOverlayManager() { return mOverlayManager; } Loading
src/com/android/launcher3/PagedView.java +11 −0 Original line number Diff line number Diff line Loading @@ -1463,6 +1463,15 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou mEdgeGlowLeft.onFlingVelocity(velocity); mEdgeGlowRight.onFlingVelocity(velocity); } // Detect if user tries to swipe to -1 page but gets disallowed by checking if there was // left-over values in mEdgeGlowLeft (or mEdgeGlowRight in RLT). final int layoutDir = getLayoutDirection(); if ((mEdgeGlowLeft.getDistance() > 0 && layoutDir == LAYOUT_DIRECTION_LTR) || (mEdgeGlowRight.getDistance() > 0 && layoutDir == LAYOUT_DIRECTION_RTL)) { onDisallowSwipeToMinusOnePage(); } mEdgeGlowLeft.onRelease(ev); mEdgeGlowRight.onRelease(ev); // End any intermediate reordering states Loading @@ -1487,6 +1496,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou return true; } protected void onDisallowSwipeToMinusOnePage() {} protected void onNotSnappingToPageInFreeScroll() { } /** Loading
src/com/android/launcher3/Workspace.java +5 −0 Original line number Diff line number Diff line Loading @@ -1123,6 +1123,11 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T> return super.onTouchEvent(ev); } @Override protected void onDisallowSwipeToMinusOnePage() { mLauncher.getOverlayManager().onDisallowSwipeToMinusOnePage(); } /** * Called directly from a CellLayout (not by the framework), after we've been added as a * listener via setOnInterceptTouchEventListener(). This allows us to tell the CellLayout Loading
src_plugins/com/android/systemui/plugins/shared/LauncherOverlayManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ public interface LauncherOverlayManager { default void onActivityDestroyed() { } default void onDisallowSwipeToMinusOnePage() {} /** * @deprecated use LauncherOverlayTouchProxy directly */ Loading