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

Commit e8041834 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Only call negative listener when SaveUI is dismissed by tapping button." into oc-mr1-dev

parents a120e6b6 620a6ced
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -263,9 +263,7 @@ final class SaveUi {
        } else {
            noButton.setText(R.string.autofill_save_no);
        }
        final View.OnClickListener cancelListener =
                (v) -> mListener.onCancel(info.getNegativeActionListener());
        noButton.setOnClickListener(cancelListener);
        noButton.setOnClickListener((v) -> mListener.onCancel(info.getNegativeActionListener()));

        final View yesButton = view.findViewById(R.id.autofill_save_yes);
        yesButton.setOnClickListener((v) -> mListener.onSave());
@@ -273,9 +271,6 @@ final class SaveUi {
        mDialog = new Dialog(context, R.style.Theme_DeviceDefault_Light_Panel);
        mDialog.setContentView(view);

        // Dialog can be dismissed when touched outside.
        mDialog.setOnDismissListener((d) -> mListener.onCancel(info.getNegativeActionListener()));

        final Window window = mDialog.getWindow();
        window.setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
        window.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE