diff options
author | Adam Cohen <adamcohen@google.com> | 2012-01-12 16:47:00 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-12 16:47:00 -0800 |
commit | dc89357810976556d20483c7fe161b68ed4d2acf (patch) | |
tree | a573eedabe811f2a83ad32b8076eeb4861fe250a /core | |
parent | c8ac86ba6baa329949137ca8dde1c3d940ff25cd (diff) | |
parent | 791a6331e3ca21e3b6cdbfee62348e45786ca3ea (diff) | |
download | frameworks_base-dc89357810976556d20483c7fe161b68ed4d2acf.zip frameworks_base-dc89357810976556d20483c7fe161b68ed4d2acf.tar.gz frameworks_base-dc89357810976556d20483c7fe161b68ed4d2acf.tar.bz2 |
Merge "Getting rid of hack where the wallpaper offset was being deferred"
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/WallpaperManager.java | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index b1c1f30..c1e28b0 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -213,10 +213,6 @@ public class WallpaperManager { mHandler.sendEmptyMessage(MSG_CLEAR_WALLPAPER); } - public Handler getHandler() { - return mHandler; - } - public Bitmap peekWallpaperBitmap(Context context, boolean returnDefault) { synchronized (this) { if (mWallpaper != null) { @@ -623,24 +619,14 @@ public class WallpaperManager { * @param yOffset The offset along the Y dimension, from 0 to 1. */ public void setWallpaperOffsets(IBinder windowToken, float xOffset, float yOffset) { - final IBinder fWindowToken = windowToken; - final float fXOffset = xOffset; - final float fYOffset = yOffset; - sGlobals.getHandler().post(new Runnable() { - public void run() { - try { - //Log.v(TAG, "Sending new wallpaper offsets from app..."); - ViewRootImpl.getWindowSession(mContext.getMainLooper()).setWallpaperPosition( - fWindowToken, fXOffset, fYOffset, mWallpaperXStep, mWallpaperYStep); - //Log.v(TAG, "...app returning after sending offsets!"); - } catch (RemoteException e) { - // Ignore. - } catch (IllegalArgumentException e) { - // Since this is being posted, it's possible that this windowToken is no longer - // valid, for example, if setWallpaperOffsets is called just before rotation. - } - } - }); + try { + //Log.v(TAG, "Sending new wallpaper offsets from app..."); + ViewRootImpl.getWindowSession(mContext.getMainLooper()).setWallpaperPosition( + windowToken, xOffset, yOffset, mWallpaperXStep, mWallpaperYStep); + //Log.v(TAG, "...app returning after sending offsets!"); + } catch (RemoteException e) { + // Ignore. + } } /** |