diff --git a/api/current.xml b/api/current.xml index 99436bdb38d6f..4cd971839ab5f 100644 --- a/api/current.xml +++ b/api/current.xml @@ -24659,6 +24659,29 @@ visibility="public" > + + + + + + + + + + + + + + 0) { + curTokenIndex--; + WindowToken token = mWallpaperTokens.get(curTokenIndex); + int curWallpaperIndex = token.windows.size(); + while (curWallpaperIndex > 0) { + curWallpaperIndex--; + WindowState wallpaper = token.windows.get(curWallpaperIndex); + try { + wallpaper.mClient.dispatchWallpaperCommand(action, + x, y, z, extras, sync); + // We only want to be synchronous with one wallpaper. + sync = false; + } catch (RemoteException e) { + } + } + } + + if (doWait) { + // XXX Need to wait for result. + } + } + + return null; + } + public int relayoutWindow(Session session, IWindow client, WindowManager.LayoutParams attrs, int requestedWidth, int requestedHeight, int viewVisibility, boolean insetsPending, @@ -6565,6 +6601,24 @@ public class WindowManagerService extends IWindowManager.Stub WindowManagerService.this.wallpaperOffsetsComplete(window); } + public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y, + int z, Bundle extras, boolean sync) { + synchronized(mWindowMap) { + long ident = Binder.clearCallingIdentity(); + try { + return sendWindowWallpaperCommandLocked( + windowForClientLocked(this, window), + action, x, y, z, extras, sync); + } finally { + Binder.restoreCallingIdentity(ident); + } + } + } + + public void wallpaperCommandComplete(IBinder window, Bundle result) { + WindowManagerService.this.wallpaperCommandComplete(window, result); + } + void windowAddedLocked() { if (mSurfaceSession == null) { if (localLOGV) Log.v( diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java index d28a15149ec9b..f0223e83522a0 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java @@ -36,6 +36,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.graphics.Typeface; import android.graphics.drawable.Drawable; +import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -1068,6 +1069,18 @@ public final class Bridge implements ILayoutBridge { // pass for now. } + @SuppressWarnings("unused") + public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y, + int z, Bundle extras, boolean sync) { + // pass for now. + return null; + } + + @SuppressWarnings("unused") + public void wallpaperCommandComplete(IBinder window, Bundle result) { + // pass for now. + } + @SuppressWarnings("unused") public void closeSystemDialogs(String reason) { // pass for now. @@ -1131,6 +1144,12 @@ public final class Bridge implements ILayoutBridge { // pass for now. } + @SuppressWarnings("unused") + public void dispatchWallpaperCommand(String action, int x, int y, + int z, Bundle extras, boolean sync) { + // pass for now. + } + @SuppressWarnings("unused") public void closeSystemDialogs(String reason) { // pass for now.