Merge commit '7580493b014a2c7ea883cd291255798dc72ebbff' into eclair-mr2 * commit '7580493b014a2c7ea883cd291255798dc72ebbff': Implement feature #2117336: Create event communication APIs for live wallpaper
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user