mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 02:08:20 +00:00
Fix bug where workspace taps were not being sent to WallpaperManager.
Bug: 77218814 Change-Id: Ied464f08dce6f96fd3c56aa790f60a2561edcc84
This commit is contained in:
@@ -477,7 +477,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
super.onViewAdded(child);
|
||||
}
|
||||
|
||||
boolean isTouchActive() {
|
||||
public boolean isTouchActive() {
|
||||
return mTouchState != TOUCH_STATE_REST;
|
||||
}
|
||||
|
||||
@@ -974,19 +974,9 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
switch (ev.getAction() & MotionEvent.ACTION_MASK) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
if (ev.getActionMasked() == 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 != null) {
|
||||
onWallpaperTap(ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onInterceptTouchEvent(ev);
|
||||
}
|
||||
@@ -1443,7 +1433,7 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
}
|
||||
}
|
||||
|
||||
protected void onWallpaperTap(MotionEvent ev) {
|
||||
public void onWallpaperTap(MotionEvent ev) {
|
||||
final int[] position = mTempXY;
|
||||
getLocationOnScreen(position);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user