diff options
author | Ben Murdoch <benm@google.com> | 2011-01-06 19:35:04 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-01-06 19:35:04 +0000 |
commit | d90f9705d6962e809191c10c14f611f7212918fa (patch) | |
tree | e84ab5b6cb4ff4f2100efe09395ea36748da940b /src/com/android/browser | |
parent | d5e5abaa809af28e4945e30906a5331fb07a40cf (diff) | |
download | packages_apps_Browser-d90f9705d6962e809191c10c14f611f7212918fa.zip packages_apps_Browser-d90f9705d6962e809191c10c14f611f7212918fa.tar.gz packages_apps_Browser-d90f9705d6962e809191c10c14f611f7212918fa.tar.bz2 |
Cast StatFs return values to long
On devices with large storage partitions, we could overflow when
converting free blocks to free bytes. Cast to long to avoid this.
Bug: 3327970
Change-Id: I3c007fc5c9fc758a03ee6ec0b7ee5a1423c170b3
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/WebStorageSizeManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/browser/WebStorageSizeManager.java b/src/com/android/browser/WebStorageSizeManager.java index 5f76f72..bd7f8e6 100644 --- a/src/com/android/browser/WebStorageSizeManager.java +++ b/src/com/android/browser/WebStorageSizeManager.java @@ -141,11 +141,11 @@ public class WebStorageSizeManager { } public long getFreeSpaceSizeBytes() { - return mFs.getAvailableBlocks() * mFs.getBlockSize(); + return (long)(mFs.getAvailableBlocks()) * mFs.getBlockSize(); } public long getTotalSizeBytes() { - return mFs.getBlockCount() * mFs.getBlockSize(); + return (long)(mFs.getBlockCount()) * mFs.getBlockSize(); } }; |