Merge "WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent"

This commit is contained in:
Michael Wright
2014-04-30 19:02:56 +00:00
committed by Gerrit Code Review

View File

@@ -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");