am 54c3529b: Merge "WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent"
* commit '54c3529b4d3f86488799caa0e62a1f3929a79a39': WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user