diff options
| author | Ricky Wai <rickywai@google.com> | 2020-02-28 16:37:07 +0000 |
|---|---|---|
| committer | Ricky Wai <rickywai@google.com> | 2020-03-12 19:36:26 +0000 |
| commit | 486d760e6bc791db3f449c6fc4c205e86cd4f2d5 (patch) | |
| tree | 341ba0baf9e69e313bde481cd9cd0ae6beb32d0b /core/java/android/app/ActivityManagerInternal.java | |
| parent | a8375cc9f85380254d18ae48b59e8954c0b7886e (diff) | |
Pass bind mount storage data decision from java to zygote
Before we used store dirty data in system property to record
if FUSE for a user is mounted, and zygote uses it to determine
if storage mount is needed. It introduces performance issues and
not reliable.
This CL does the following changes:
- System server determines if storage dirs mount are needed, and store
the record inside system server.
- It passes the verdict to zygote so zygote just need to follow the
input.
- When emulated storage is mounted / unmounted, it will record if
FUSE for that user is ready to use, and will be used for determining
if storage dirs mount are needed when a new process starts.
- After emulated storage is mounted, it will create an async thread
to remount all storage dirs for existing app processes. As we have a
record of pids that storage dirs are not mounted yet, we can use it
directly without scanning the whole /proc in vold.
Bug: 149548518
Test: After flag is enabled, AdoptableHostTest still pass.
Change-Id: Ic99d027d42b2b9a1c7fd03070b36c44882c6e7c5
Diffstat (limited to 'core/java/android/app/ActivityManagerInternal.java')
| -rw-r--r-- | core/java/android/app/ActivityManagerInternal.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java index ec110435d95c..489a0de0518e 100644 --- a/core/java/android/app/ActivityManagerInternal.java +++ b/core/java/android/app/ActivityManagerInternal.java @@ -34,6 +34,7 @@ import android.os.TransactionTooLargeException; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * Activity manager local system service interface. @@ -124,6 +125,12 @@ public abstract class ActivityManagerInternal { public abstract int getUidProcessState(int uid); /** + * Get a map of pid and package name that process of that pid Android/data and Android/obb + * directory is not mounted to lowerfs. + */ + public abstract Map<Integer, String> getProcessesWithPendingBindMounts(int userId); + + /** * @return {@code true} if system is ready, {@code false} otherwise. */ public abstract boolean isSystemReady(); |
