Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Fix the position of a logcat logging statement. If, for wha…
…tever reason, the event parameter is null, then the previous placement would have caused an exception.
  • Loading branch information
lioncash committed Aug 28, 2013
1 parent 8ca3ed1 commit d484056
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -128,10 +128,11 @@ public boolean onKey(DialogInterface dlg, int keyCode, KeyEvent event)
{
public boolean onMotion(MotionEvent event)
{
Log.d("InputConfigFragment", "Received motion event: " + event.getAction());
if (event == null || (event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) == 0)
return false;

Log.d("InputConfigFragment", "Received motion event: " + event.getAction());

InputDevice input = event.getDevice();
List<InputDevice.MotionRange> motions = input.getMotionRanges();
if (firstEvent)
Expand Down

0 comments on commit d484056

Please sign in to comment.