diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-11-10 11:10:09 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-11-10 13:02:30 -0800 |
commit | 6adba2467ca524b4c4f3d775de6aa10a9ad57aea (patch) | |
tree | ef787ea39cb877f2745248dba1dd4b0fd80fc735 /core/java/android/service | |
parent | 119a767565399809d222ddda6392e5e58942d5e6 (diff) | |
download | frameworks_base-6adba2467ca524b4c4f3d775de6aa10a9ad57aea.zip frameworks_base-6adba2467ca524b4c4f3d775de6aa10a9ad57aea.tar.gz frameworks_base-6adba2467ca524b4c4f3d775de6aa10a9ad57aea.tar.bz2 |
Fix issue #2170897: wallpaper touch-up event not seen when exiting lock screen
Make sure to deliver events to the wallpaper until the final up.
Also fix behavior in the case where a window goes away while the pointer is still
down in it, which is a fairly novel situation introduced by the new lock screen.
Also add infrastructure for delivering motion events during preview.
Change-Id: I0de7979be27e00caf0b1eff794ea899a815142f6
Diffstat (limited to 'core/java/android/service')
-rw-r--r-- | core/java/android/service/wallpaper/IWallpaperEngine.aidl | 3 | ||||
-rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/service/wallpaper/IWallpaperEngine.aidl b/core/java/android/service/wallpaper/IWallpaperEngine.aidl index bbd9dde..37e6133 100644 --- a/core/java/android/service/wallpaper/IWallpaperEngine.aidl +++ b/core/java/android/service/wallpaper/IWallpaperEngine.aidl @@ -16,11 +16,14 @@ package android.service.wallpaper; +import android.view.MotionEvent; + /** * @hide */ oneway interface IWallpaperEngine { void setDesiredSize(int width, int height); void setVisibility(boolean visible); + void dispatchPointer(in MotionEvent event); void destroy(); } diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index e79832b..b29d837 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -746,6 +746,12 @@ public abstract class WallpaperService extends Service { mCaller.sendMessage(msg); } + public void dispatchPointer(MotionEvent event) { + if (mEngine != null) { + mEngine.mWindow.onDispatchPointer(event, event.getEventTime(), false); + } + } + public void destroy() { Message msg = mCaller.obtainMessage(DO_DETACH); mCaller.sendMessage(msg); @@ -805,6 +811,7 @@ public abstract class WallpaperService extends Service { mEngine.mPendingMove = null; } } + if (DEBUG) Log.v(TAG, "Delivering touch event: " + ev); mEngine.onTouchEvent(ev); ev.recycle(); } break; |