diff options
author | Jan-Willem Maarse <maarse@google.com> | 2014-08-20 20:03:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-20 18:43:12 +0000 |
commit | 2111606845bec8b40e8eb164c73c60f59c028014 (patch) | |
tree | 75f529a8e386805963d9d59bf8bdf1c855677c0b /src/com/android/launcher3 | |
parent | c50438c802355dff714b04f42a32e518cb9e91d8 (diff) | |
parent | d3fbe683bb52c8be9a14783bb70f32a46cf6f6db (diff) | |
download | android_packages_apps_Trebuchet-2111606845bec8b40e8eb164c73c60f59c028014.tar.gz android_packages_apps_Trebuchet-2111606845bec8b40e8eb164c73c60f59c028014.tar.bz2 android_packages_apps_Trebuchet-2111606845bec8b40e8eb164c73c60f59c028014.zip |
Merge "Ignore generic motion events if custom content doesn't allow scrolling" into ub-now-porkchop
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index a6cce9346..3ec5ddc60 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1115,6 +1115,17 @@ public class Workspace extends SmoothPagedView return super.onInterceptTouchEvent(ev); } + @Override + public boolean onGenericMotionEvent(MotionEvent event) { + // Ignore pointer scroll events if the custom content doesn't allow scrolling. + if ((getScreenIdForPageIndex(getCurrentPage()) == CUSTOM_CONTENT_SCREEN_ID) + && (mCustomContentCallbacks != null) + && !mCustomContentCallbacks.isScrollingAllowed()) { + return false; + } + return super.onGenericMotionEvent(event); + } + protected void reinflateWidgetsIfNecessary() { final int clCount = getChildCount(); for (int i = 0; i < clCount; i++) { |