Send live wallpaper taps.

Change-Id: I25465e6fa7a69ef5c35e69ddc375e65797f44bc6
This commit is contained in:
Jeff Brown
2010-12-02 18:27:39 -08:00
parent 16fddef875
commit 1d0867c8de
3 changed files with 27 additions and 6 deletions
+10 -1
View File
@@ -757,8 +757,9 @@ public abstract class PagedView extends ViewGroup {
break;
}
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
onWallpaperTap(ev);
case MotionEvent.ACTION_CANCEL:
mTouchState = TOUCH_STATE_REST;
mAllowLongPress = false;
mActivePointerId = INVALID_POINTER;
@@ -958,6 +959,8 @@ public abstract class PagedView extends ViewGroup {
} else {
snapToDestination();
}
} else {
onWallpaperTap(ev);
}
mTouchState = TOUCH_STATE_REST;
mActivePointerId = INVALID_POINTER;
@@ -1011,6 +1014,12 @@ public abstract class PagedView extends ViewGroup {
mVelocityTracker.clear();
}
}
if (mTouchState == TOUCH_STATE_REST) {
onWallpaperTap(ev);
}
}
protected void onWallpaperTap(MotionEvent ev) {
}
@Override