summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/os/FileUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/os/FileUtils.java b/core/java/android/os/FileUtils.java
index 88d6e84..3b89c6c 100644
--- a/core/java/android/os/FileUtils.java
+++ b/core/java/android/os/FileUtils.java
@@ -1040,11 +1040,13 @@ public class FileUtils {
public static long roundStorageSize(long size) {
long val = 1;
long pow = 1;
- while ((val * pow) < size) {
+ long pow1024 = 1;
+ while ((val * pow1024) < size) {
val <<= 1;
if (val > 512) {
val = 1;
pow *= 1000;
+ pow1024 *= 1024;
}
}
return val * pow;