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

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

Merge "CredentialFragment anti-pocket dialing measures."

parents cd79e3a7 11bf7802
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -366,13 +366,22 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends OptionsMenuFra
            }
        }

        /**
         * Dialog setup.
         * <p>
         * To make it less likely that the dialog is dismissed accidentally, for example if the
         * device is malfunctioning or if the device is in a pocket, we set
         * {@code setCanceledOnTouchOutside(false)}.
         */
        @Override
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            return new AlertDialog.Builder(getActivity())
            Dialog dialog = new AlertDialog.Builder(getActivity())
                    .setTitle(getArguments().getString(ARG_TITLE))
                    .setMessage(getArguments().getInt(ARG_MESSAGE))
                    .setPositiveButton(getArguments().getInt(ARG_BUTTON), null)
                    .create();
            dialog.setCanceledOnTouchOutside(false);
            return dialog;
        }

        @Override