diff options
Diffstat (limited to 'services/java/com/android/server/WallpaperManagerService.java')
| -rw-r--r-- | services/java/com/android/server/WallpaperManagerService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java index 21a1956..97dd98f 100644 --- a/services/java/com/android/server/WallpaperManagerService.java +++ b/services/java/com/android/server/WallpaperManagerService.java @@ -639,6 +639,12 @@ class WallpaperManagerService extends IWallpaperManager.Stub { throw new IllegalArgumentException("width and height must be > 0"); } + int maxWidth = mContext.getResources().getInteger( + com.android.internal.R.integer.config_wallpaperMaxWidth); + if (maxWidth != -1 && width > maxWidth) { + width = maxWidth; + } + if (width != wallpaper.width || height != wallpaper.height) { wallpaper.width = width; wallpaper.height = height; |
