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

* commit '809c369892ddbae908dc47e6a1032a768e9004cb':
  WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent
This commit is contained in:
Michael Wright
2014-04-30 19:11:05 +00:00
committed by Android Git Automerger

View File

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