diff options
Diffstat (limited to 'core/java/android/service')
-rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index 7ce96c0..6917fb2 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -140,6 +140,7 @@ public abstract class WallpaperService extends Service { boolean mIsCreating; boolean mDrawingAllowed; boolean mOffsetsChanged; + boolean mFixedSizeAllowed; int mWidth; int mHeight; int mFormat; @@ -211,7 +212,7 @@ public abstract class WallpaperService extends Service { @Override public void setFixedSize(int width, int height) { - if (Process.myUid() != Process.SYSTEM_UID) { + if (!mFixedSizeAllowed) { // Regular apps can't do this. It can only work for // certain designs of window animations, so you can't // rely on it. @@ -385,7 +386,12 @@ public abstract class WallpaperService extends Service { updateSurface(false, false, false); } } - + + /** {@hide} */ + public void setFixedSizeAllowed(boolean allowed) { + mFixedSizeAllowed = allowed; + } + /** * Called once to initialize the engine. After returning, the * engine's surface will be created by the framework. |