From 39eeb370321d4da0f995b71814e95451b81a5152 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 14 Aug 2013 07:33:17 -0400 Subject: [PATCH] [Android] Correct the accessibility scope of a method and variable in InputConfigFragment.java. Also, join a variable's declaration and assignment in the onMotionEvent() function. If no explicit accessibility term (private, protected, public, etc) is given, then the permission level is set to something called 'package-private' which means it is set to the scope of the whole package. So technically any class could have access to this method and variable, which is likely not what we want. --- .../org/dolphinemu/dolphinemu/InputConfigFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/InputConfigFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/InputConfigFragment.java index 50e49a2383..5be1416944 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/InputConfigFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/InputConfigFragment.java @@ -111,9 +111,9 @@ public final class InputConfigFragment extends Fragment } }; - static ArrayList m_values = new ArrayList(); + private static ArrayList m_values = new ArrayList(); - void AssignBind(String bind) + private void AssignBind(String bind) { InputConfigItem o = adapter.getItem(configPosition); adapter.remove(o); @@ -149,8 +149,8 @@ public final class InputConfigFragment extends Fragment { for (int a = 0; a < motions.size(); ++a) { - InputDevice.MotionRange range; - range = motions.get(a); + InputDevice.MotionRange range = motions.get(a); + if (m_values.get(a) > (event.getAxisValue(range.getAxis()) + 0.5f)) { AssignBind("Device '" + InputConfigFragment.getInputDesc(input) + "'-Axis " + range.getAxis() + "-");