diff options
| author | Sudheer Shanka <sudheersai@google.com> | 2018-10-10 21:00:04 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-10-10 21:00:04 +0000 |
| commit | dcd0b0abde284a1497948b7af89fbb9a6d130fb5 (patch) | |
| tree | bd5fe43e82a679dc7f38be29bc7963e747f1dc4c /core/java/android | |
| parent | b1424bc4f0517ae077f03cbd42adba5a9a243944 (diff) | |
| parent | 584b0681254ecc30bd33cfe6e71358f9098ee45a (diff) | |
Merge "Delete package sandbox data when it is uninstalled."
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/os/storage/StorageManagerInternal.java | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/core/java/android/os/storage/StorageManagerInternal.java b/core/java/android/os/storage/StorageManagerInternal.java index 1f54ea53facc..63ff7b22f364 100644 --- a/core/java/android/os/storage/StorageManagerInternal.java +++ b/core/java/android/os/storage/StorageManagerInternal.java @@ -16,6 +16,9 @@ package android.os.storage; +import android.annotation.NonNull; +import android.annotation.Nullable; + /** * Mount service local interface. * @@ -81,18 +84,26 @@ public abstract class StorageManagerInternal { public abstract int getExternalStorageMountMode(int uid, String packageName); /** - * Mount external storage for the given package. + * Create storage sandbox for the given package. * * <p> This will involve calling into vold to setup appropriate bind mounts. * - * @param packageName The package for which external storage will be mounted. + * @param packageName The package for which the sandbox needs to be created. * @param appId The appId for the given package. * @param sharedUserId The sharedUserId for given package if it specified * {@code android:sharedUserId} in the manifest, otherwise {@code null} - * @param userId The userId in which the storage needs to be mounted. + * @param userId The userId in which the sandbox needs to be created. + */ + public abstract void prepareSandboxForApp(@NonNull String packageName, int appId, + @Nullable String sharedUserId, int userId); + + /** + * Delete storage sandbox for the given package. + * + * @param packageName The package for which the sandbox needs to be destroyed. + * @param userId The userId in which the sandbox needs to be destroyed. */ - public abstract void mountExternalStorageForApp(String packageName, int appId, - String sharedUserId, int userId); + public abstract void destroySandboxForApp(@NonNull String packageName, int userId); /** * @return Labels of storage volumes that are visible to the given userId. |
