[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.
This commit is contained in:
Lioncash 2013-08-14 07:33:17 -04:00
parent 0142efbb2a
commit 39eeb37032
1 changed files with 4 additions and 4 deletions

View File

@ -111,9 +111,9 @@ public final class InputConfigFragment extends Fragment
} }
}; };
static ArrayList<Float> m_values = new ArrayList<Float>(); private static ArrayList<Float> m_values = new ArrayList<Float>();
void AssignBind(String bind) private void AssignBind(String bind)
{ {
InputConfigItem o = adapter.getItem(configPosition); InputConfigItem o = adapter.getItem(configPosition);
adapter.remove(o); adapter.remove(o);
@ -149,8 +149,8 @@ public final class InputConfigFragment extends Fragment
{ {
for (int a = 0; a < motions.size(); ++a) for (int a = 0; a < motions.size(); ++a)
{ {
InputDevice.MotionRange range; InputDevice.MotionRange range = motions.get(a);
range = motions.get(a);
if (m_values.get(a) > (event.getAxisValue(range.getAxis()) + 0.5f)) if (m_values.get(a) > (event.getAxisValue(range.getAxis()) + 0.5f))
{ {
AssignBind("Device '" + InputConfigFragment.getInputDesc(input) + "'-Axis " + range.getAxis() + "-"); AssignBind("Device '" + InputConfigFragment.getInputDesc(input) + "'-Axis " + range.getAxis() + "-");