fix comment on 90eb53c0b4bd

This commit is contained in:
Jimmy Shih
2011-11-05 11:44:19 -07:00
parent fe9e6d47a2
commit 1911187450
3 changed files with 62 additions and 77 deletions
@@ -221,39 +221,6 @@ public class StringUtils implements DescriptionGenerator {
this.context = context;
}
/**
* Formats a time for voice announcement.
*
* @param time the time
*/
public String formatTimeLong(long time) {
int[] parts = getTimeParts(time);
String secLabel =
context.getString(parts[0] == 1 ? R.string.voice_second : R.string.voice_seconds);
String minLabel =
context.getString(parts[1] == 1 ? R.string.voice_minute : R.string.voice_minutes);
String hourLabel =
context.getString(parts[2] == 1 ? R.string.voice_hour : R.string.voice_hours);
StringBuilder sb = new StringBuilder();
if (parts[2] != 0) {
sb.append(parts[2]);
sb.append(" ");
sb.append(hourLabel);
sb.append(" ");
sb.append(parts[1]);
sb.append(minLabel);
} else {
sb.append(parts[1]);
sb.append(" ");
sb.append(minLabel);
sb.append(" ");
sb.append(parts[0]);
sb.append(secLabel);
}
return sb.toString();
}
/**
* Generates a description for a track (with information about the
* statistics).