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

Commit 79c32139 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Add shell cmd blob_store idle-maintenance." into rvc-dev am: 29c8617d

Change-Id: I470a5a940f9416b4d2a95a0eb52d62d2e7f51f64
parents ac5086ac 29c8617d
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -939,6 +939,12 @@ public class BlobStoreManagerService extends SystemService {
        }
    }

    void runIdleMaintenance() {
        synchronized (mBlobsLock) {
            handleIdleMaintenanceLocked();
        }
    }

    @GuardedBy("mBlobsLock")
    private void dumpSessionsLocked(IndentingPrintWriter fout, DumpArgs dumpArgs) {
        for (int i = 0, userCount = mSessions.size(); i < userCount; ++i) {
@@ -1408,9 +1414,7 @@ public class BlobStoreManagerService extends SystemService {
    private class LocalService extends BlobStoreManagerInternal {
        @Override
        public void onIdleMaintenance() {
            synchronized (mBlobsLock) {
                handleIdleMaintenanceLocked();
            }
            runIdleMaintenance();
        }
    }

+9 −0
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ class BlobStoreManagerShellCommand extends ShellCommand {
                return runClearAllBlobs(pw);
            case "delete-blob":
                return runDeleteBlob(pw);
            case "idle-maintenance":
                return runIdleMaintenance(pw);
            default:
                return handleDefaultCommands(cmd);
        }
@@ -84,6 +86,11 @@ class BlobStoreManagerShellCommand extends ShellCommand {
        return 0;
    }

    private int runIdleMaintenance(PrintWriter pw) {
        mService.runIdleMaintenance();
        return 0;
    }

    @Override
    public void onHelp() {
        final PrintWriter pw = getOutPrintWriter();
@@ -112,6 +119,8 @@ class BlobStoreManagerShellCommand extends ShellCommand {
        pw.println("      --expiry: Expiry time of the blob to delete, in milliseconds.");
        pw.println("      --label: Label of the blob to delete.");
        pw.println("      --tag: Tag of the blob to delete.");
        pw.println("idle-maintenance");
        pw.println("    Run idle maintenance which takes care of removing stale data.");
        pw.println();
    }