Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b59fe31 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 1275 into donut

* changes:
  Make the internal storage monitor work correctly when internal storage is very large.
parents 98acd54f 0bfbae2c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);