summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/WallpaperManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index ced72f80a029..c2bbff0e743a 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -668,6 +668,10 @@ public class WallpaperManager {
* not "image/*"
*/
public Intent getCropAndSetWallpaperIntent(Uri imageUri) {
+ if (imageUri == null) {
+ throw new IllegalArgumentException("Image URI must not be null");
+ }
+
if (!ContentResolver.SCHEME_CONTENT.equals(imageUri.getScheme())) {
throw new IllegalArgumentException("Image URI must be of the "
+ ContentResolver.SCHEME_CONTENT + " scheme type");