Merge "Don't crash if WallpaperCropActivity isn't passed a URI" into jb-ub-now-indigo-rose
This commit is contained in:
committed by
Android (Google) Code Review
commit
9e91b7d5fc
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user