1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 22:31:16 +00:00

Removed debug code.

This commit is contained in:
Felix Ableitner 2015-06-17 22:03:47 +02:00
parent 1c16b0e709
commit bcb87dbb92

View file

@ -576,11 +576,6 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
long bytes = bits / 8;
if (bytes <= 0) return "0 " + units[0];
int digitGroups = (int) (Math.log10(bytes) / Math.log10(1024));
if (digitGroups < 0 || digitGroups > 4)
throw new ArrayIndexOutOfBoundsException("bits=" + Long.toString(bits) +
", bytes=" + Long.toString(bytes) +
" (int) digitGroups=" + Integer.toString(digitGroups) +
" (double) digitGroups=" + Double.toString(Math.log10(bytes) / Math.log10(1024)));
return new DecimalFormat("#,##0.#")
.format(bytes / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}