Skip to content

Commit 85a61c4

Browse files
Ben KomaloAndroid (Google) Code Review
authored andcommitted
Merge "Only run "core" apps when encrypting device." into ics-factoryrom
2 parents 6c03850 + 553acf0 commit 85a61c4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

services/java/com/android/server/SystemServer.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464

6565
class ServerThread extends Thread {
6666
private static final String TAG = "SystemServer";
67+
private static final String ENCRYPTING_STATE = "trigger_restart_min_framework";
6768

6869
ContentResolver mContentResolver;
6970

@@ -147,9 +148,15 @@ public void run() {
147148
AttributeCache.init(context);
148149

149150
Slog.i(TAG, "Package Manager");
151+
// Only run "core" apps if we're encrypting the device.
152+
String cryptState = SystemProperties.get("vold.decrypt");
153+
boolean onlyCore = ENCRYPTING_STATE.equals(cryptState);
154+
if (onlyCore) {
155+
Slog.w(TAG, "Detected encryption in progress - only parsing core apps");
156+
}
150157
pm = PackageManagerService.main(context,
151158
factoryTest != SystemServer.FACTORY_TEST_OFF,
152-
false);
159+
onlyCore);
153160

154161
ActivityManagerService.setSystemProcess();
155162

0 commit comments

Comments
 (0)