summaryrefslogtreecommitdiffstats
path: root/core/java/android/view
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-10-22 20:21:07 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-10-22 20:21:07 -0700
commitc6bead14fe6fe70bcfd8802ee9f0259476a074ce (patch)
treeda87fdeab6d3d23feeba589a1e0fad1596f4f6f7 /core/java/android/view
parentf0d9c0000858f3e48bcd1efec75f2dff1cbc6ed5 (diff)
parent7580493b014a2c7ea883cd291255798dc72ebbff (diff)
downloadframeworks_base-c6bead14fe6fe70bcfd8802ee9f0259476a074ce.zip
frameworks_base-c6bead14fe6fe70bcfd8802ee9f0259476a074ce.tar.gz
frameworks_base-c6bead14fe6fe70bcfd8802ee9f0259476a074ce.tar.bz2
am 7580493b: Implement feature #2117336: Create event communication APIs for live wallpaper
Merge commit '7580493b014a2c7ea883cd291255798dc72ebbff' into eclair-mr2 * commit '7580493b014a2c7ea883cd291255798dc72ebbff': Implement feature #2117336: Create event communication APIs for live wallpaper
Diffstat (limited to 'core/java/android/view')
-rw-r--r--core/java/android/view/IWindow.aidl7
-rw-r--r--core/java/android/view/IWindowSession.aidl6
-rw-r--r--core/java/android/view/ViewRoot.java10
3 files changed, 21 insertions, 2 deletions
diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl
index 7977578..6bfc8b5 100644
--- a/core/java/android/view/IWindow.aidl
+++ b/core/java/android/view/IWindow.aidl
@@ -18,11 +18,11 @@
package android.view;
import android.graphics.Rect;
+import android.os.Bundle;
+import android.os.ParcelFileDescriptor;
import android.view.KeyEvent;
import android.view.MotionEvent;
-import android.os.ParcelFileDescriptor;
-
/**
* API back to a client window that the Window Manager uses to inform it of
* interesting things happening.
@@ -63,4 +63,7 @@ oneway interface IWindow {
* Called for wallpaper windows when their offsets change.
*/
void dispatchWallpaperOffsets(float x, float y, boolean sync);
+
+ void dispatchWallpaperCommand(String action, int x, int y,
+ int z, in Bundle extras, boolean sync);
}
diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl
index 9b8b6d4..7e7a38f 100644
--- a/core/java/android/view/IWindowSession.aidl
+++ b/core/java/android/view/IWindowSession.aidl
@@ -19,6 +19,7 @@ package android.view;
import android.graphics.Rect;
import android.graphics.Region;
+import android.os.Bundle;
import android.view.IWindow;
import android.view.MotionEvent;
import android.view.WindowManager;
@@ -116,4 +117,9 @@ interface IWindowSession {
void setWallpaperPosition(IBinder windowToken, float x, float y);
void wallpaperOffsetsComplete(IBinder window);
+
+ Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
+ int z, in Bundle extras, boolean sync);
+
+ void wallpaperCommandComplete(IBinder window, in Bundle result);
}
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 5c2b3c9..e4f2b63 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -2904,6 +2904,16 @@ public final class ViewRoot extends Handler implements ViewParent,
}
}
}
+
+ public void dispatchWallpaperCommand(String action, int x, int y,
+ int z, Bundle extras, boolean sync) {
+ if (sync) {
+ try {
+ sWindowSession.wallpaperCommandComplete(asBinder(), null);
+ } catch (RemoteException e) {
+ }
+ }
+ }
}
/**