OSDN Git Service

Don't spin up encryption unaware providers twice.
authorJeff Sharkey <jsharkey@android.com>
Tue, 12 Jan 2016 20:44:20 +0000 (13:44 -0700)
committerJeff Sharkey <jsharkey@android.com>
Tue, 12 Jan 2016 20:44:36 +0000 (13:44 -0700)
Bug: 26503591
Change-Id: I31b92f3a31103dffb17de8ac8d887d864cb0de28

services/core/java/com/android/server/am/ActivityManagerService.java

index b27b92d..e8d831f 100644 (file)
@@ -10832,6 +10832,14 @@ public final class ActivityManagerService extends ActivityManagerNative
      * belonging to any running apps.
      */
     private void installEncryptionUnawareProviders(int userId) {
+        if (!StorageManager.isFileBasedEncryptionEnabled()) {
+            // TODO: eventually pivot this back to look at current user state,
+            // similar to the comment in UserManager.isUserUnlocked(), but for
+            // now, if we started apps when "unlocked" then unaware providers
+            // have already been spun up.
+            return;
+        }
+
         synchronized (this) {
             final int NP = mProcessNames.getMap().size();
             for (int ip = 0; ip < NP; ip++) {