Skip to content

Commit 69a6d53

Browse files
Ben KomaloAndroid (Google) Code Review
authored andcommitted
Merge "Enter minimal boot mode when booting encrypted" into ics-factoryrom
2 parents 2783e1c + 3573d40 commit 69a6d53

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
class ServerThread extends Thread {
6666
private static final String TAG = "SystemServer";
6767
private static final String ENCRYPTING_STATE = "trigger_restart_min_framework";
68+
private static final String ENCRYPTED_STATE = "1";
6869

6970
ContentResolver mContentResolver;
7071

@@ -150,10 +151,15 @@ public void run() {
150151
Slog.i(TAG, "Package Manager");
151152
// Only run "core" apps if we're encrypting the device.
152153
String cryptState = SystemProperties.get("vold.decrypt");
153-
boolean onlyCore = ENCRYPTING_STATE.equals(cryptState);
154-
if (onlyCore) {
154+
boolean onlyCore = false;
155+
if (ENCRYPTING_STATE.equals(cryptState)) {
155156
Slog.w(TAG, "Detected encryption in progress - only parsing core apps");
157+
onlyCore = true;
158+
} else if (ENCRYPTED_STATE.equals(cryptState)) {
159+
Slog.w(TAG, "Device encrypted - only parsing core apps");
160+
onlyCore = true;
156161
}
162+
157163
pm = PackageManagerService.main(context,
158164
factoryTest != SystemServer.FACTORY_TEST_OFF,
159165
onlyCore);

0 commit comments

Comments
 (0)