fix safeMode status in AppWidgetService

AppWidgetService uses safemode value that defined on SystemServiceManager.
however mSystemServiceManager.setSafeMode never called.
therefore AppWidgetService doesn't know whether safemode or not in boot phase.
In safemode, it causes NullPointerException in parsing function.
after that all of placed widgets disappear at launcher app.

Change-Id: I7576dcba7a2f548b2afa48ff2c700372c6920fe8
This commit is contained in:
joonyoung.cho
2015-04-08 13:56:34 +09:00
parent 40c4021a70
commit 2f30cc1cfe
2 changed files with 3 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ public class AppWidgetService extends SystemService {
@Override
public void onBootPhase(int phase) {
if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
if (phase == PHASE_ACTIVITY_MANAGER_READY) {
mImpl.setSafeMode(isSafeMode());
}
}

View File

@@ -1035,6 +1035,8 @@ public final class SystemServer {
reportWtf("making Display Manager Service ready", e);
}
mSystemServiceManager.setSafeMode(safeMode);
// These are needed to propagate to the runnable below.
final MountService mountServiceF = mountService;
final NetworkManagementService networkManagementF = networkManagement;