Fix regression: taps were not sent to wallpaper

Change-Id: I2114cf8161c7a3b0fa6849f15e5a8e4bd45dbabb
This commit is contained in:
Michael Jurka
2011-08-09 15:00:48 -07:00
parent cddd8d3cad
commit d771c96e5d
4 changed files with 22 additions and 11 deletions
+11 -3
View File
@@ -598,11 +598,20 @@ public class Workspace extends SmoothPagedView
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
switch (ev.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
mXDown = ev.getX();
mYDown = ev.getY();
break;
case MotionEvent.ACTION_POINTER_UP:
case MotionEvent.ACTION_UP:
if (mTouchState == TOUCH_STATE_REST) {
final CellLayout currentPage = (CellLayout) getChildAt(mCurrentPage);
if (!currentPage.lastDownOnOccupiedCell()) {
onWallpaperTap(ev);
}
}
}
return super.onInterceptTouchEvent(ev);
}
@@ -1291,7 +1300,6 @@ public class Workspace extends SmoothPagedView
}
}
@Override
protected void onWallpaperTap(MotionEvent ev) {
final int[] position = mTempCell;
getLocationOnScreen(position);