InputConfigFragment: Use a StringBuilder for string concatenation

This is the recommended way to join strings, since it doesn't destroy and recreate the string repeatedly.
This commit is contained in:
Lioncash 2014-11-20 09:18:27 -05:00
parent da962a3d2b
commit feb038bec3
1 changed files with 3 additions and 3 deletions

View File

@ -91,12 +91,12 @@ public final class InputConfigFragment extends PreferenceFragment
else else
{ {
List<InputDevice.MotionRange> motions = input.getMotionRanges(); List<InputDevice.MotionRange> motions = input.getMotionRanges();
String fakeid = ""; StringBuilder fakeid = new StringBuilder();
for (InputDevice.MotionRange range : motions) for (InputDevice.MotionRange range : motions)
fakeid += range.getAxis(); fakeid.append(range.getAxis());
return fakeid; return fakeid.toString();
} }
} }
} }