Multiple appends are better than an append of a concatenation

This commit is contained in:
Daniel Martí 2013-12-12 00:13:09 +01:00
parent f4fa7db8c8
commit d042ed7508

View File

@ -474,8 +474,7 @@ public class AppDetails extends ListActivity {
if (listNum == -1) { if (listNum == -1) {
output.append("\t• "); output.append("\t• ");
} else { } else {
output.append("\t" + Integer.toString(listNum) output.append("\t").append(Integer.toString(listNum)).append(". ");
+ ". ");
listNum++; listNum++;
} }
} else { } else {
@ -510,7 +509,7 @@ public class AppDetails extends ListActivity {
String permissionName = permissions.next(); String permissionName = permissions.next();
try { try {
Permission permission = new Permission(this, permissionName); Permission permission = new Permission(this, permissionName);
sb.append("\t• " + permission.getName() + '\n'); sb.append("\t• ").append(permission.getName()).append('\n');
} catch (NameNotFoundException e) { } catch (NameNotFoundException e) {
if (permissionName.equals("ACCESS_SUPERUSER")) { if (permissionName.equals("ACCESS_SUPERUSER")) {
sb.append("\t• Full permissions to all device features and storage\n"); sb.append("\t• Full permissions to all device features and storage\n");
@ -537,7 +536,7 @@ public class AppDetails extends ListActivity {
for (String af : app.antiFeatures) { for (String af : app.antiFeatures) {
String afdesc = descAntiFeature(af); String afdesc = descAntiFeature(af);
if (afdesc != null) { if (afdesc != null) {
sb.append("\t• " + afdesc + "\n"); sb.append("\t• ").append(afdesc).append("\n");
} }
} }
if (sb.length() > 0) { if (sb.length() > 0) {