From 867e5d1ede9a3acd57cd290d76ff10bc9f3acae3 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 14 Jul 2015 01:30:48 +0200 Subject: [PATCH] Commented original source of readable file size/transfer rate functions. --- .../java/com/nutomic/syncthingandroid/syncthing/RestApi.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java index 11b0a99f..e89068fa 100644 --- a/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java +++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/RestApi.java @@ -509,6 +509,8 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener, /** * Converts a number of bytes to a human readable file size (eg 3.5 GiB). + * + * Based on http://stackoverflow.com/a/5599842 */ public static String readableFileSize(Context context, long bytes) { final String[] units = context.getResources().getStringArray(R.array.file_size_units); @@ -521,6 +523,8 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener, /** * Converts a number of bytes to a human readable transfer rate in bytes per second * (eg 100 KiB/s). + * + * Based on http://stackoverflow.com/a/5599842 */ public static String readableTransferRate(Context context, long bits) { final String[] units = context.getResources().getStringArray(R.array.transfer_rate_units);