Loading core/java/android/app/WallpaperManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -3354,7 +3354,7 @@ public class WallpaperManager { try { //Log.v(TAG, "Sending new wallpaper offsets from app..."); WindowManagerGlobal.getWindowSession().sendWallpaperCommand( windowToken, action, x, y, z, extras, false); windowToken, action, x, y, z, extras); //Log.v(TAG, "...app returning after sending offsets!"); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading core/java/android/service/wallpaper/WallpaperService.java +4 −29 Original line number Diff line number Diff line Loading @@ -244,7 +244,6 @@ public abstract class WallpaperService extends Service { int y; int z; Bundle extras; boolean sync; } /** Loading Loading @@ -367,7 +366,6 @@ public abstract class WallpaperService extends Service { private Bitmap mLastScreenshot; private boolean mResetWindowPages; boolean mPendingSync; MotionEvent mPendingMove; boolean mIsInAmbientMode; Loading Loading @@ -536,16 +534,13 @@ public abstract class WallpaperService extends Service { @Override public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync) { float zoom) { synchronized (mLock) { if (DEBUG) Log.v(TAG, "Dispatch wallpaper offsets: " + x + ", " + y); mPendingXOffset = x; mPendingYOffset = y; mPendingXOffsetStep = xStep; mPendingYOffsetStep = yStep; if (sync) { mPendingSync = true; } if (!mOffsetMessageEnqueued) { mOffsetMessageEnqueued = true; Message msg = mCaller.obtainMessage(MSG_WALLPAPER_OFFSETS); Loading @@ -558,7 +553,7 @@ public abstract class WallpaperService extends Service { @Override public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras, boolean sync) { int z, Bundle extras) { synchronized (mLock) { if (DEBUG) Log.v(TAG, "Dispatch wallpaper command: " + x + ", " + y); WallpaperCommand cmd = new WallpaperCommand(); Loading @@ -567,7 +562,6 @@ public abstract class WallpaperService extends Service { cmd.y = y; cmd.z = z; cmd.extras = extras; cmd.sync = sync; Message msg = mCaller.obtainMessage(MSG_WALLPAPER_COMMAND); msg.obj = cmd; mCaller.sendMessage(msg); Loading Loading @@ -1183,7 +1177,6 @@ public abstract class WallpaperService extends Service { out.print(" mPendingXOffsetStep="); out.println(mPendingXOffsetStep); out.print(prefix); out.print("mOffsetMessageEnqueued="); out.print(mOffsetMessageEnqueued); out.print(" mPendingSync="); out.println(mPendingSync); if (mPendingMove != null) { out.print(prefix); out.print("mPendingMove="); out.println(mPendingMove); } Loading Loading @@ -1827,14 +1820,11 @@ public abstract class WallpaperService extends Service { float yOffset; float xOffsetStep; float yOffsetStep; boolean sync; synchronized (mLock) { xOffset = mPendingXOffset; yOffset = mPendingYOffset; xOffsetStep = mPendingXOffsetStep; yOffsetStep = mPendingYOffsetStep; sync = mPendingSync; mPendingSync = false; mOffsetMessageEnqueued = false; } Loading @@ -1852,14 +1842,6 @@ public abstract class WallpaperService extends Service { } } if (sync) { try { if (DEBUG) Log.v(TAG, "Reporting offsets change complete"); mSession.wallpaperOffsetsComplete(mWindow.asBinder()); } catch (RemoteException e) { } } // setup local color extraction data processLocalColors(); } Loading Loading @@ -2218,17 +2200,10 @@ public abstract class WallpaperService extends Service { updateFrozenState(/* frozenRequested= */ !COMMAND_UNFREEZE.equals(cmd.action)); } result = onCommand(cmd.action, cmd.x, cmd.y, cmd.z, cmd.extras, cmd.sync); cmd.extras, false); } else { result = null; } if (cmd.sync) { try { if (DEBUG) Log.v(TAG, "Reporting command complete"); mSession.wallpaperCommandComplete(mWindow.asBinder(), result); } catch (RemoteException e) { } } } private void updateFrozenState(boolean frozenRequested) { Loading Loading @@ -2634,7 +2609,7 @@ public abstract class WallpaperService extends Service { public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras) { if (mEngine != null) { mEngine.mWindow.dispatchWallpaperCommand(action, x, y, z, extras, false); mEngine.mWindow.dispatchWallpaperCommand(action, x, y, z, extras); } } Loading core/java/android/view/IWindow.aidl +13 −11 Original line number Diff line number Diff line Loading @@ -91,10 +91,12 @@ oneway interface IWindow { /** * Called for wallpaper windows when their offsets or zoom level change. */ void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync); void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom); void dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras, boolean sync); /** * Called for wallpaper windows when a visible app sends an arbitrary wallpaper command. */ void dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras); /** * Drag/drop events Loading core/java/android/view/IWindowSession.aidl +1 −7 Original line number Diff line number Diff line Loading @@ -208,19 +208,13 @@ interface IWindowSession { */ oneway void setShouldZoomOutWallpaper(IBinder windowToken, boolean shouldZoom); @UnsupportedAppUsage oneway void wallpaperOffsetsComplete(IBinder window); /** * Apply a raw offset to the wallpaper service when shown behind this window. */ oneway void setWallpaperDisplayOffset(IBinder windowToken, int x, int y); oneway void sendWallpaperCommand(IBinder window, String action, int x, int y, int z, in Bundle extras, boolean sync); @UnsupportedAppUsage oneway void wallpaperCommandComplete(IBinder window, in Bundle result); int z, in Bundle extras); /** * Notifies that a rectangle on the screen has been requested. Loading core/java/android/view/ViewRootImpl.java +2 −15 Original line number Diff line number Diff line Loading @@ -11964,24 +11964,11 @@ public final class ViewRootImpl implements ViewParent, @Override public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync) { if (sync) { try { mWindowSession.wallpaperOffsetsComplete(asBinder()); } catch (RemoteException e) { } } float zoom) { } @Override public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras, boolean sync) { if (sync) { try { mWindowSession.wallpaperCommandComplete(asBinder(), null); } catch (RemoteException e) { } } public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras) { } /* Drag/drop */ Loading Loading
core/java/android/app/WallpaperManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -3354,7 +3354,7 @@ public class WallpaperManager { try { //Log.v(TAG, "Sending new wallpaper offsets from app..."); WindowManagerGlobal.getWindowSession().sendWallpaperCommand( windowToken, action, x, y, z, extras, false); windowToken, action, x, y, z, extras); //Log.v(TAG, "...app returning after sending offsets!"); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading
core/java/android/service/wallpaper/WallpaperService.java +4 −29 Original line number Diff line number Diff line Loading @@ -244,7 +244,6 @@ public abstract class WallpaperService extends Service { int y; int z; Bundle extras; boolean sync; } /** Loading Loading @@ -367,7 +366,6 @@ public abstract class WallpaperService extends Service { private Bitmap mLastScreenshot; private boolean mResetWindowPages; boolean mPendingSync; MotionEvent mPendingMove; boolean mIsInAmbientMode; Loading Loading @@ -536,16 +534,13 @@ public abstract class WallpaperService extends Service { @Override public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync) { float zoom) { synchronized (mLock) { if (DEBUG) Log.v(TAG, "Dispatch wallpaper offsets: " + x + ", " + y); mPendingXOffset = x; mPendingYOffset = y; mPendingXOffsetStep = xStep; mPendingYOffsetStep = yStep; if (sync) { mPendingSync = true; } if (!mOffsetMessageEnqueued) { mOffsetMessageEnqueued = true; Message msg = mCaller.obtainMessage(MSG_WALLPAPER_OFFSETS); Loading @@ -558,7 +553,7 @@ public abstract class WallpaperService extends Service { @Override public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras, boolean sync) { int z, Bundle extras) { synchronized (mLock) { if (DEBUG) Log.v(TAG, "Dispatch wallpaper command: " + x + ", " + y); WallpaperCommand cmd = new WallpaperCommand(); Loading @@ -567,7 +562,6 @@ public abstract class WallpaperService extends Service { cmd.y = y; cmd.z = z; cmd.extras = extras; cmd.sync = sync; Message msg = mCaller.obtainMessage(MSG_WALLPAPER_COMMAND); msg.obj = cmd; mCaller.sendMessage(msg); Loading Loading @@ -1183,7 +1177,6 @@ public abstract class WallpaperService extends Service { out.print(" mPendingXOffsetStep="); out.println(mPendingXOffsetStep); out.print(prefix); out.print("mOffsetMessageEnqueued="); out.print(mOffsetMessageEnqueued); out.print(" mPendingSync="); out.println(mPendingSync); if (mPendingMove != null) { out.print(prefix); out.print("mPendingMove="); out.println(mPendingMove); } Loading Loading @@ -1827,14 +1820,11 @@ public abstract class WallpaperService extends Service { float yOffset; float xOffsetStep; float yOffsetStep; boolean sync; synchronized (mLock) { xOffset = mPendingXOffset; yOffset = mPendingYOffset; xOffsetStep = mPendingXOffsetStep; yOffsetStep = mPendingYOffsetStep; sync = mPendingSync; mPendingSync = false; mOffsetMessageEnqueued = false; } Loading @@ -1852,14 +1842,6 @@ public abstract class WallpaperService extends Service { } } if (sync) { try { if (DEBUG) Log.v(TAG, "Reporting offsets change complete"); mSession.wallpaperOffsetsComplete(mWindow.asBinder()); } catch (RemoteException e) { } } // setup local color extraction data processLocalColors(); } Loading Loading @@ -2218,17 +2200,10 @@ public abstract class WallpaperService extends Service { updateFrozenState(/* frozenRequested= */ !COMMAND_UNFREEZE.equals(cmd.action)); } result = onCommand(cmd.action, cmd.x, cmd.y, cmd.z, cmd.extras, cmd.sync); cmd.extras, false); } else { result = null; } if (cmd.sync) { try { if (DEBUG) Log.v(TAG, "Reporting command complete"); mSession.wallpaperCommandComplete(mWindow.asBinder(), result); } catch (RemoteException e) { } } } private void updateFrozenState(boolean frozenRequested) { Loading Loading @@ -2634,7 +2609,7 @@ public abstract class WallpaperService extends Service { public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras) { if (mEngine != null) { mEngine.mWindow.dispatchWallpaperCommand(action, x, y, z, extras, false); mEngine.mWindow.dispatchWallpaperCommand(action, x, y, z, extras); } } Loading
core/java/android/view/IWindow.aidl +13 −11 Original line number Diff line number Diff line Loading @@ -91,10 +91,12 @@ oneway interface IWindow { /** * Called for wallpaper windows when their offsets or zoom level change. */ void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync); void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom); void dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras, boolean sync); /** * Called for wallpaper windows when a visible app sends an arbitrary wallpaper command. */ void dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras); /** * Drag/drop events Loading
core/java/android/view/IWindowSession.aidl +1 −7 Original line number Diff line number Diff line Loading @@ -208,19 +208,13 @@ interface IWindowSession { */ oneway void setShouldZoomOutWallpaper(IBinder windowToken, boolean shouldZoom); @UnsupportedAppUsage oneway void wallpaperOffsetsComplete(IBinder window); /** * Apply a raw offset to the wallpaper service when shown behind this window. */ oneway void setWallpaperDisplayOffset(IBinder windowToken, int x, int y); oneway void sendWallpaperCommand(IBinder window, String action, int x, int y, int z, in Bundle extras, boolean sync); @UnsupportedAppUsage oneway void wallpaperCommandComplete(IBinder window, in Bundle result); int z, in Bundle extras); /** * Notifies that a rectangle on the screen has been requested. Loading
core/java/android/view/ViewRootImpl.java +2 −15 Original line number Diff line number Diff line Loading @@ -11964,24 +11964,11 @@ public final class ViewRootImpl implements ViewParent, @Override public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync) { if (sync) { try { mWindowSession.wallpaperOffsetsComplete(asBinder()); } catch (RemoteException e) { } } float zoom) { } @Override public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras, boolean sync) { if (sync) { try { mWindowSession.wallpaperCommandComplete(asBinder(), null); } catch (RemoteException e) { } } public void dispatchWallpaperCommand(String action, int x, int y, int z, Bundle extras) { } /* Drag/drop */ Loading