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

Commit 361fd378 authored by rickywai's avatar rickywai Committed by Automerger Merge Worker
Browse files

Merge "Return error in "sm unmount-app-data-dirs" if app data isolation is not...

Merge "Return error in "sm unmount-app-data-dirs" if app data isolation is not enabled" am: 4d53e3b9

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556237

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If03f03feb9f89a15fa5ca0e6145fbe87a5a150a1
parents e8a98db6 4d53e3b9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.os.IVoldTaskListener;
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.storage.DiskInfo;
import android.os.storage.IStorageManager;
import android.os.storage.StorageManager;
@@ -30,6 +31,8 @@ import java.util.concurrent.CompletableFuture;

public final class Sm {
    private static final String TAG = "Sm";
    private static final String ANDROID_VOLD_APP_DATA_ISOLATION_ENABLED_PROPERTY =
            "persist.sys.vold_app_data_isolation_enabled";

    IStorageManager mSm;

@@ -256,6 +259,10 @@ public final class Sm {
    }

    public void runDisableAppDataIsolation() throws RemoteException {
        if (!SystemProperties.getBoolean(
                ANDROID_VOLD_APP_DATA_ISOLATION_ENABLED_PROPERTY, false)) {
            throw new IllegalStateException("Storage app data isolation is not enabled.");
        }
        final String pkgName = nextArg();
        final int pid = Integer.parseInt(nextArg());
        final int userId = Integer.parseInt(nextArg());