X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2FCreateHomeScreenShortcut.java;h=1eb74fb6dcdefe36ae21eea7f158e91fdb5b9a59;hb=e29020961c70d97a06c810aaff28ef1fd6af4ae7;hp=35601387e5b097829a003dca7bc913f3915c23af;hpb=757139ad59282fb8400bc641a4be574e0b88de49;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/CreateHomeScreenShortcut.java b/app/src/main/java/com/stoutner/privacybrowser/CreateHomeScreenShortcut.java index 35601387..1eb74fb6 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/CreateHomeScreenShortcut.java +++ b/app/src/main/java/com/stoutner/privacybrowser/CreateHomeScreenShortcut.java @@ -37,12 +37,10 @@ import android.widget.EditText; public class CreateHomeScreenShortcut extends DialogFragment { // The public interface is used to send information back to the parent activity. public interface CreateHomeScreenSchortcutListener { - void onCancelCreateHomeScreenShortcut(DialogFragment dialogFragment); - void onCreateHomeScreenShortcut(DialogFragment dialogFragment); } - //createHomeScreenShortcutListener is used in `onAttach` and and `onCreateDialog`. + //`createHomeScreenShortcutListener` is used in `onAttach()` and `onCreateDialog()`. private CreateHomeScreenSchortcutListener createHomeScreenShortcutListener; // Check to make sure that the parent activity implements the listener. @@ -74,7 +72,7 @@ public class CreateHomeScreenShortcut extends DialogFragment { dialogBuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - createHomeScreenShortcutListener.onCancelCreateHomeScreenShortcut(CreateHomeScreenShortcut.this); + // Do nothing if `Cancel` is clicked. } }); @@ -93,7 +91,7 @@ public class CreateHomeScreenShortcut extends DialogFragment { // Show the keyboard when the Dialog is displayed on the screen. alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); - // We need to show the `AlertDialog` before we can call setOnKeyListener() below. + // We need to show `alertDialog` before we can call `setOnKeyListener()` below. alertDialog.show(); // Allow the "enter" key on the keyboard to create the shortcut.