diff options
author | Kunhung Li <kunhungli@google.com> | 2019-04-17 13:49:40 +0800 |
---|---|---|
committer | Kunhung Li <kunhungli@google.com> | 2019-04-18 12:14:37 +0000 |
commit | 2118fe717fc2ce7164ac8fcb645a3fe7140a6fe6 (patch) | |
tree | 23e26302f0ad822b20833ed992a0dce97452cef2 | |
parent | bcee738c7c509109e7262185b0d6f198771a45c3 (diff) | |
download | android_packages_wallpapers_LivePicker-2118fe717fc2ce7164ac8fcb645a3fe7140a6fe6.tar.gz android_packages_wallpapers_LivePicker-2118fe717fc2ce7164ac8fcb645a3fe7140a6fe6.tar.bz2 android_packages_wallpapers_LivePicker-2118fe717fc2ce7164ac8fcb645a3fe7140a6fe6.zip |
Fix touch is being consumed by customizable panel
This is caused by dispatching touch event to wallpaper engine without
conditions. It will check if there is no other view to handle touch event
then dispatch to wallpaper engine.
Bug: 130681068
Test: Manual test
Change-Id: Ie59e8af5afbfa4ac5e3d0bfe52faf3c4d7259ac0
-rw-r--r-- | src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java index 9cd50c3..7cfdb4d 100644 --- a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java +++ b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java @@ -504,14 +504,6 @@ public class LiveWallpaperPreview extends Activity { @Override public boolean dispatchTouchEvent(MotionEvent ev) { - if (mWallpaperConnection != null && mWallpaperConnection.mEngine != null) { - MotionEvent dup = MotionEvent.obtainNoHistory(ev); - try { - mWallpaperConnection.mEngine.dispatchPointer(dup); - } catch (RemoteException e) { - } - } - if (ev.getAction() == MotionEvent.ACTION_DOWN) { onUserInteraction(); } @@ -521,6 +513,12 @@ public class LiveWallpaperPreview extends Activity { } if (!handled && mWallpaperConnection != null && mWallpaperConnection.mEngine != null) { + MotionEvent dup = MotionEvent.obtainNoHistory(ev); + try { + mWallpaperConnection.mEngine.dispatchPointer(dup); + } catch (RemoteException e) { + } + int action = ev.getActionMasked(); try { if (action == MotionEvent.ACTION_UP) { |