am 54c3529b: Merge "WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent"

* commit '54c3529b4d3f86488799caa0e62a1f3929a79a39':
  WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent
This commit is contained in:
Michael Wright
2014-04-30 19:06:40 +00:00
committed by Android Git Automerger

View File

@@ -664,6 +664,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");