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

Commit dd02e0ea authored by Tobias Thierer's avatar Tobias Thierer Committed by android-build-merger
Browse files

Merge "remove x attribute of java file" am: 554284ed am: 52fdb475 am: bad5969a

am: 5980a24a

Change-Id: I9a790f86c51c5d19fa2d8a75e67528fd742be124
parents f8b9b91b 5980a24a
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -736,7 +736,7 @@ public final class DropBoxManagerService extends SystemService {
     * Trims the files on disk to make sure they aren't using too much space.
     * @return the overall quota for storage (in bytes)
     */
    private synchronized long trimToFit() {
    private synchronized long trimToFit() throws IOException {
        // Expunge aged items (including tombstones marking deleted data).

        int ageSeconds = Settings.Global.getInt(mContentResolver,
@@ -768,7 +768,12 @@ public final class DropBoxManagerService extends SystemService {
            int quotaKb = Settings.Global.getInt(mContentResolver,
                    Settings.Global.DROPBOX_QUOTA_KB, DEFAULT_QUOTA_KB);

            mStatFs.restat(mDropBoxDir.getPath());
            String dirPath = mDropBoxDir.getPath();
            try {
                mStatFs.restat(dirPath);
            } catch (IllegalArgumentException e) {  // restat throws this on error
                throw new IOException("Can't restat: " + mDropBoxDir);
            }
            int available = mStatFs.getAvailableBlocks();
            int nonreserved = available - mStatFs.getBlockCount() * reservePercent / 100;
            int maximum = quotaKb * 1024 / mBlockSize;