summaryrefslogtreecommitdiff
path: root/Source/Android/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2013-08-26 11:58:51 -0400
committerLioncash <mathew1800@gmail.com>2013-08-26 11:58:51 -0400
commitba274368f8455849d419ce686f36361841e7b891 (patch)
treec2e4f8f7023b12c250587cec3cfded85246ca0f3 /Source/Android/src
parente0519356591ddb6060dace4190bc733d04a0e53b (diff)
[Android] Make the dialog variable in InputConfigFragment a local variable in onPreferenceTreeClick. With the new input UI, this doesn't need to be accessible to other classes.
Also change the documentation of the custom dialog class.
Diffstat (limited to 'Source/Android/src')
-rw-r--r--Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java
index 686aa4b4c7..8c9f6f0be4 100644
--- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java
+++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java
@@ -35,7 +35,6 @@ public final class InputConfigFragment extends PreferenceFragment
private Activity m_activity;
private boolean firstEvent = true;
private static ArrayList<Float> m_values = new ArrayList<Float>();
- protected MotionAlertDialog dialog;
/**
* Gets the descriptor for the given {@link InputDevice}.
@@ -47,7 +46,7 @@ public final class InputConfigFragment extends PreferenceFragment
public static String getInputDesc(InputDevice input)
{
if (input == null)
- return "null"; // Happens when the inputdevice is from an unknown source
+ return "null"; // Happens when the InputDevice is from an unknown source
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
{
@@ -97,7 +96,7 @@ public final class InputConfigFragment extends PreferenceFragment
public boolean onPreferenceTreeClick(final PreferenceScreen screen, final Preference pref)
{
// Begin the creation of the input alert.
- dialog = new MotionAlertDialog(m_activity);
+ final MotionAlertDialog dialog = new MotionAlertDialog(m_activity);
// Set the key listener
dialog.setOnKeyEventListener(new MotionAlertDialog.OnKeyEventListener()
@@ -205,7 +204,9 @@ public final class InputConfigFragment extends PreferenceFragment
/**
- * {@link AlertDialog} class derivative that can handle motion events.
+ * {@link AlertDialog} class derivative that allows the motion listener
+ * to be set anonymously, so the creation of an explicit class for
+ * providing functionality is not necessary.
*/
protected static final class MotionAlertDialog extends AlertDialog
{