Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
lioncash committed Aug 14, 2013
1 parent 0142efb commit 39eeb37
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -111,9 +111,9 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
}
};

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);
adapter.remove(o);
Expand Down Expand Up @@ -149,8 +149,8 @@ public boolean onMotionEvent(MotionEvent event)
{
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() + "-");
Expand Down

0 comments on commit 39eeb37

Please sign in to comment.