Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6502c31 authored by Michael Jurka's avatar Michael Jurka
Browse files

Don't crash if WallpaperCropActivity isn't passed a URI

Bug: 11173560
parent decbaa69
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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);