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

Commit 8b0d7ba4 authored by zhuw's avatar zhuw Committed by Rajshekar Eashwarappa
Browse files

Fix always pop up dialog when return pick page.

add new flag to control showing this dialog

Change-Id: I22bf9baa06341c72c62432e424f84f5c69e17185
CRs-Fixed: 2105743
parent 3dff27ea
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ public class EditorTruePortraitFusion extends Editor {

    protected ImageTruePortraitFusion mImageFusion;
    private Uri mUnderlayUri = Uri.EMPTY;
    private boolean pickDialogHasShown = false;

    public EditorTruePortraitFusion() {
        super(ID);
@@ -163,12 +164,13 @@ public class EditorTruePortraitFusion extends Editor {
                fusionUri = Uri.EMPTY;
        }

        pickDialogHasShown = false;
        setUnderlayImageUri(fusionUri);
    }

    @Override
    public void resume() {
        if(mUnderlayUri.equals(Uri.EMPTY)) {
        if(mUnderlayUri.equals(Uri.EMPTY) && !pickDialogHasShown) {
            // No underlay set.
            boolean skipIntro = GalleryUtils.getBooleanPref(mContext,
                    mContext.getString(R.string.pref_trueportrait_fusion_intro_show_key), false);
@@ -191,6 +193,7 @@ public class EditorTruePortraitFusion extends Editor {
                    dialog.setOnOkButtonClickListener(new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int id) {
                            pickDialogHasShown = true;
                            MasterImage.getImage().getActivity().pickImage(FilterShowActivity.SELECT_FUSION_UNDERLAY);
                        }
                    });