Add sm set-isolated-storage [true|false]

Bug: 119038726
Test: manual
Change-Id: I29eeec7872584f1173e9b6d31434b36487515d9e
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 0c4a0b3e..1bae3f7 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -468,6 +468,14 @@
     }
 
     /**
+     * Returns location of packages cache directory.
+     * {@hide}
+     */
+    public static File getPackageCacheDirectory() {
+        return new File(getDataSystemDirectory(), "package_cache");
+    }
+
+    /**
      * Return the primary shared/external storage directory. This directory may
      * not currently be accessible if it has been mounted by the user on their
      * computer, has been removed from the device, or some other problem has
diff --git a/core/java/android/os/FileUtils.java b/core/java/android/os/FileUtils.java
index 0b90f54..1f47f93 100644
--- a/core/java/android/os/FileUtils.java
+++ b/core/java/android/os/FileUtils.java
@@ -1156,11 +1156,16 @@
     public static @Nullable File createDir(File baseDir, String name) {
         final File dir = new File(baseDir, name);
 
+        return createDir(dir) ? dir : null;
+    }
+
+    /** @hide */
+    public static boolean createDir(File dir) {
         if (dir.exists()) {
-            return dir.isDirectory() ? dir : null;
+            return dir.isDirectory();
         }
 
-        return dir.mkdir() ? dir : null;
+        return dir.mkdir();
     }
 
     /**
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index c91cda6..a61d8cb 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -225,6 +225,8 @@
     public static final int DEBUG_SDCARDFS_FORCE_OFF = 1 << 4;
     /** {@hide} */
     public static final int DEBUG_VIRTUAL_DISK = 1 << 5;
+    /** {@hide} */
+    public static final int DEBUG_ISOLATED_STORAGE = 1 << 6;
 
     /** {@hide} */
     public static final int FLAG_STORAGE_DE = IInstalld.FLAG_STORAGE_DE;