From cc054b9da3dd4627ec6a8e1869c2e07846d1f321 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 7 Sep 2013 18:51:15 -0400 Subject: [PATCH] [Android] Make the MotionAlertDialog private. This isn't needed to be protected anymore. The only reason it was protected was for when the input settings were coupled as all hell to the GameListActivity (lol). Also documented the interface method within it. --- .../dolphinemu/settings/InputConfigFragment.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java index 1436f4bdd7..26e89f412d 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/settings/InputConfigFragment.java @@ -208,7 +208,7 @@ public final class InputConfigFragment extends PreferenceFragment * to be set anonymously, so the creation of an explicit class for * providing functionality is not necessary. */ - protected static final class MotionAlertDialog extends AlertDialog + private static final class MotionAlertDialog extends AlertDialog { private OnMotionEventListener motionListener; @@ -229,6 +229,13 @@ public final class InputConfigFragment extends PreferenceFragment */ public interface OnMotionEventListener { + /** + * Denotes the behavior that should happen when a motion event occurs. + * + * @param event Reference to the {@link MotionEvent} that occurred. + * + * @return true if the {@link MotionEvent} is consumed in this call; false otherwise. + */ boolean onMotion(MotionEvent event); } @@ -245,7 +252,7 @@ public final class InputConfigFragment extends PreferenceFragment @Override public boolean dispatchKeyEvent(KeyEvent event) { - if (this.onKeyDown(event.getKeyCode(), event)) + if (onKeyDown(event.getKeyCode(), event)) return true; return super.dispatchKeyEvent(event);