summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-11-10 18:07:33 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-10 18:07:33 -0800
commit510c489a081dae49f86033ecbf1b6e866c69656c (patch)
tree8474ccdf467ef23f38c5d157723b52a304ed3a99
parenta888740c5a7325f98e282fdabccc154c93f2daae (diff)
parentd4e57d4cb45c0c7db605420dccd9fd4db854e998 (diff)
downloadandroid_packages_wallpapers_LivePicker-510c489a081dae49f86033ecbf1b6e866c69656c.tar.gz
android_packages_wallpapers_LivePicker-510c489a081dae49f86033ecbf1b6e866c69656c.tar.bz2
android_packages_wallpapers_LivePicker-510c489a081dae49f86033ecbf1b6e866c69656c.zip
am d4e57d4c: Related work on issue #2170897.
Merge commit 'd4e57d4cb45c0c7db605420dccd9fd4db854e998' into eclair-mr2 * commit 'd4e57d4cb45c0c7db605420dccd9fd4db854e998': Related work on issue #2170897.
-rw-r--r--src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
index cbc783d..f63d5a0 100644
--- a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
+++ b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
@@ -32,6 +32,7 @@ import android.os.RemoteException;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
import android.os.Bundle;
+import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.ViewGroup;
@@ -182,6 +183,25 @@ public class LiveWallpaperPreview extends Activity {
mWallpaperConnection = null;
}
+ @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();
+ }
+ if (getWindow().superDispatchTouchEvent(ev)) {
+ return true;
+ }
+ return onTouchEvent(ev);
+ }
+
class WallpaperConnection extends IWallpaperConnection.Stub implements ServiceConnection {
final Intent mIntent;
IWallpaperService mService;