am 8154495f: am 69a6d537: Merge "Enter minimal boot mode when booting encrypted" into ics-factoryrom

* commit '8154495fc7b09938709ded2d07e8f9419cc94be7':
  Enter minimal boot mode when booting encrypted
This commit is contained in:
Ben Komalo
2011-09-26 12:05:15 -07:00
committed by Android Git Automerger

View File

@@ -65,6 +65,7 @@ import java.util.TimerTask;
class ServerThread extends Thread {
private static final String TAG = "SystemServer";
private static final String ENCRYPTING_STATE = "trigger_restart_min_framework";
private static final String ENCRYPTED_STATE = "1";
ContentResolver mContentResolver;
@@ -152,10 +153,15 @@ class ServerThread extends Thread {
Slog.i(TAG, "Package Manager");
// Only run "core" apps if we're encrypting the device.
String cryptState = SystemProperties.get("vold.decrypt");
boolean onlyCore = ENCRYPTING_STATE.equals(cryptState);
if (onlyCore) {
boolean onlyCore = false;
if (ENCRYPTING_STATE.equals(cryptState)) {
Slog.w(TAG, "Detected encryption in progress - only parsing core apps");
onlyCore = true;
} else if (ENCRYPTED_STATE.equals(cryptState)) {
Slog.w(TAG, "Device encrypted - only parsing core apps");
onlyCore = true;
}
pm = PackageManagerService.main(context,
factoryTest != SystemServer.FACTORY_TEST_OFF,
onlyCore);