[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.

This commit is contained in:
Lioncash 2013-09-07 18:51:15 -04:00
parent 913853d441
commit cc054b9da3

View File

@ -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);