File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
services/java/com/android/server Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6565class 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 );
You can’t perform that action at this time.
0 commit comments