summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2013-10-14 22:31:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-14 22:31:50 +0000
commit9e91b7d5fccebc454424657e62497016ebdc7d1e (patch)
tree280f5d8b8a7105a82e7651a2ad72b212ecb3281f /src
parent140e79bb48f6639f2d58c729d6f2597bda0a51b1 (diff)
parentf6502c316c602e44fd5a1706013d7123a9eb1022 (diff)
downloadandroid_packages_apps_Trebuchet-9e91b7d5fccebc454424657e62497016ebdc7d1e.tar.gz
android_packages_apps_Trebuchet-9e91b7d5fccebc454424657e62497016ebdc7d1e.tar.bz2
android_packages_apps_Trebuchet-9e91b7d5fccebc454424657e62497016ebdc7d1e.zip
Merge "Don't crash if WallpaperCropActivity isn't passed a URI" into jb-ub-now-indigo-rose
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/WallpaperCropActivity.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher3/WallpaperCropActivity.java b/src/com/android/launcher3/WallpaperCropActivity.java
index 79cc88ef9..30ec340b1 100644
--- a/src/com/android/launcher3/WallpaperCropActivity.java
+++ b/src/com/android/launcher3/WallpaperCropActivity.java
@@ -87,9 +87,15 @@ public class WallpaperCropActivity extends Activity {
mCropView = (CropView) findViewById(R.id.cropView);
- Intent cropIntent = this.getIntent();
+ Intent cropIntent = getIntent();
final Uri imageUri = cropIntent.getData();
+ if (imageUri == null) {
+ Log.e(LOGTAG, "No URI passed in intent, exiting WallpaperCropActivity");
+ finish();
+ return;
+ }
+
int rotation = getRotationFromExif(this, imageUri);
mCropView.setTileSource(new BitmapRegionTileSource(this, imageUri, 1024, rotation), null);
mCropView.setTouchEnabled(true);