From e51005da04b634802aad99e9e5e5f23eb1e7aeee Mon Sep 17 00:00:00 2001 From: Sudheer Shanka Date: Sun, 24 Feb 2019 10:24:09 -0800 Subject: Look for visible vols for a user under /mnt/user//package/. Currently, we pass down visisble volumes for a user to zygote so that it can set up appropriate bind mounts after forking. This method has atleast a couple of race conditions, so instead make zygote just look under /mnt/user//package for volumes that need to be handled for a particular user. Bug: 126069494 Test: manual Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore* Change-Id: Iab47eb34d38a25dfda4a686db9b7203ad4885a93 --- core/java/android/os/Process.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'core/java/android/os/Process.java') diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 9e97e375753c..cd43b42c8ca5 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -505,7 +505,6 @@ public class Process { * @param invokeWith null-ok the command to invoke with. * @param packageName null-ok the name of the package this process belongs to. * @param packagesForUid null-ok all the packages with the same uid as this process. - * @param visibleVols null-ok storage volumes that can be accessed by this process. * @param zygoteArgs Additional arguments to supply to the zygote process. * * @return An object that describes the result of the attempt to start the process. @@ -525,13 +524,12 @@ public class Process { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, - @Nullable String[] visibleVols, @Nullable String sandboxId, @Nullable String[] zygoteArgs) { return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, - packagesForUid, visibleVols, sandboxId, /*useBlastulaPool=*/ true, zygoteArgs); + packagesForUid, sandboxId, /*useBlastulaPool=*/ true, zygoteArgs); } /** @hide */ @@ -547,13 +545,12 @@ public class Process { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, - @Nullable String[] visibleVols, @Nullable String sandboxId, @Nullable String[] zygoteArgs) { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, - packagesForUid, visibleVols, sandboxId, /*useBlastulaPool=*/ false, zygoteArgs); + packagesForUid, sandboxId, /*useBlastulaPool=*/ false, zygoteArgs); } /** -- cgit v1.2.3