diff options
author | Marco Nelissen <marcone@google.com> | 2009-05-08 14:28:40 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2009-05-08 14:28:40 -0700 |
commit | 0bfbae2c3241112f14abca6c9792e759e85e1c5e (patch) | |
tree | cc24c75cf459a2546da9a0f13a45abc4428a68cf /services/java/com | |
parent | c825d3ebd6ca66e65e63fdc76f032e08aa2a8e22 (diff) | |
download | frameworks_base-0bfbae2c3241112f14abca6c9792e759e85e1c5e.zip frameworks_base-0bfbae2c3241112f14abca6c9792e759e85e1c5e.tar.gz frameworks_base-0bfbae2c3241112f14abca6c9792e759e85e1c5e.tar.bz2 |
Make the internal storage monitor work correctly when internal storage is very large.
Diffstat (limited to 'services/java/com')
-rw-r--r-- | services/java/com/android/server/DeviceStorageMonitorService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/DeviceStorageMonitorService.java b/services/java/com/android/server/DeviceStorageMonitorService.java index 85861bb..52e09ca 100644 --- a/services/java/com/android/server/DeviceStorageMonitorService.java +++ b/services/java/com/android/server/DeviceStorageMonitorService.java @@ -74,7 +74,7 @@ class DeviceStorageMonitorService extends Binder { private boolean mLowMemFlag=false; private Context mContext; private ContentResolver mContentResolver; - int mBlkSize; + long mBlkSize; long mTotalMemory; StatFs mFileStats; private static final String DATA_PATH="/data"; @@ -251,7 +251,7 @@ class DeviceStorageMonitorService extends Binder { //initialize block size mBlkSize = mFileStats.getBlockSize(); //initialize total storage on device - mTotalMemory = (mFileStats.getBlockCount()*mBlkSize)/100; + mTotalMemory = ((long)mFileStats.getBlockCount()*mBlkSize)/100L; mStorageLowIntent = new Intent(Intent.ACTION_DEVICE_STORAGE_LOW); mStorageOkIntent = new Intent(Intent.ACTION_DEVICE_STORAGE_OK); checkMemory(true); |