#317 Detailed log files

This commit is contained in:
Honfika
2014-01-03 14:04:54 +01:00
parent 55b4b5c381
commit e22a981f9e
14 changed files with 309 additions and 119 deletions

View File

@@ -536,6 +536,19 @@ public class Helper {
return timeStr;
}
public static String formatFileSize(long fileSizeLong) {
double fileSize = fileSizeLong;
if (fileSize < 1024) {
return String.format("%d bytes", fileSizeLong) ;
}
fileSize /= 1024;
if (fileSize < 1024) {
return String.format("%.2f KB", fileSize) ;
}
fileSize /= 1024;
return String.format("%.2f MB", fileSize) ;
}
public static void freeMem() {
Cache.clearAll();
System.gc();