Merge "Only run "core" apps when encrypting device." into ics-factoryrom
This commit is contained in:
@ -64,6 +64,7 @@ import java.util.TimerTask;
|
|||||||
|
|
||||||
class ServerThread extends Thread {
|
class ServerThread extends Thread {
|
||||||
private static final String TAG = "SystemServer";
|
private static final String TAG = "SystemServer";
|
||||||
|
private static final String ENCRYPTING_STATE = "trigger_restart_min_framework";
|
||||||
|
|
||||||
ContentResolver mContentResolver;
|
ContentResolver mContentResolver;
|
||||||
|
|
||||||
@ -147,9 +148,15 @@ class ServerThread extends Thread {
|
|||||||
AttributeCache.init(context);
|
AttributeCache.init(context);
|
||||||
|
|
||||||
Slog.i(TAG, "Package Manager");
|
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) {
|
||||||
|
Slog.w(TAG, "Detected encryption in progress - only parsing core apps");
|
||||||
|
}
|
||||||
pm = PackageManagerService.main(context,
|
pm = PackageManagerService.main(context,
|
||||||
factoryTest != SystemServer.FACTORY_TEST_OFF,
|
factoryTest != SystemServer.FACTORY_TEST_OFF,
|
||||||
false);
|
onlyCore);
|
||||||
|
|
||||||
ActivityManagerService.setSystemProcess();
|
ActivityManagerService.setSystemProcess();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user