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

Commit 34cc2124 authored by Yash Garg's avatar Yash Garg 💬
Browse files

Merge branch '519-q-change_wallpaper_activity' into 'v1-q'

Change wallpaper activity to StandalonePreviewActivity

See merge request !53
parents 8314bf10 555c421d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ public class Wallpaper extends Activity {
    private static final String KEY_SPOTLIGHT_X = "spotlightX";
    private static final String KEY_SPOTLIGHT_Y = "spotlightY";
    private static final String KEY_FROM_SCREENCOLOR = "fromScreenColor";
    private static final String PREVIEW_ACTIVITY = "com.android.wallpaper.picker.StandalonePreviewActivity";

    private static final int STATE_INIT = 0;
    private static final int STATE_PHOTO_PICKED = 1;
@@ -115,7 +116,8 @@ public class Wallpaper extends Activity {
                if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) && (!fromScreenColor)) {
                    WallpaperManager wpm = WallpaperManager.getInstance(getApplicationContext());
                    try {
                        cropAndSetWallpaperIntent = wpm.getCropAndSetWallpaperIntent(mPickedItem);
                        cropAndSetWallpaperIntent = new Intent(PREVIEW_ACTIVITY)
                                                        .setDataAndType(mPickedItem, IMAGE_TYPE);
                        startActivity(cropAndSetWallpaperIntent);
                        finish();
                        return;