diff options
| author | Dianne Hackborn <hackbod@google.com> | 2009-10-20 20:15:20 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2009-10-22 20:10:53 -0700 |
| commit | 7580493b014a2c7ea883cd291255798dc72ebbff (patch) | |
| tree | 22bffa58ac973192ea8b06ea747e1582526c1249 /core/java/android/view | |
| parent | 86dc4d312216be0b4c2847a1e79d94efaf4b9559 (diff) | |
| download | frameworks_base-7580493b014a2c7ea883cd291255798dc72ebbff.zip frameworks_base-7580493b014a2c7ea883cd291255798dc72ebbff.tar.gz frameworks_base-7580493b014a2c7ea883cd291255798dc72ebbff.tar.bz2 | |
Implement feature #2117336: Create event communication APIs for live wallpaper
Note: currently only implements an async version (no result), and not yet
actually tested.
Change-Id: Id47ed045a4b0eb309ea8c58daf41a0e03eff1d3a
Diffstat (limited to 'core/java/android/view')
| -rw-r--r-- | core/java/android/view/IWindow.aidl | 7 | ||||
| -rw-r--r-- | core/java/android/view/IWindowSession.aidl | 6 | ||||
| -rw-r--r-- | core/java/android/view/ViewRoot.java | 10 |
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 3b83044..f4593f5 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -2903,6 +2903,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) { + } + } + } } /** |
