Skip to content

Commit

Permalink
Start MountService before performBootDexOpt
Browse files Browse the repository at this point in the history
This change is to start Mountservice before starting
performBootDexOpt, as in one case, in performBootDexOpt
when system upgrade happens, StorageManager will be started to
get the low threshold of DataDir. But, at this point, as
Mountservice is still not up, StorageManager will end up
having a null object of Mountservice.

Change-Id: If2b5e1b58e7d2a72c6313f196e98a68738295ec6
  • Loading branch information
boedhack authored and The Android Automerger committed Dec 1, 2014
1 parent 93edcc1 commit e1eea11
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions services/java/com/android/server/SystemServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -546,20 +546,6 @@ private void startOtherServices() {
reportWtf("making display ready", e);
}

try {
mPackageManagerService.performBootDexOpt();
} catch (Throwable e) {
reportWtf("performing boot dexopt", e);
}

try {
ActivityManagerNative.getDefault().showBootMessage(
context.getResources().getText(
com.android.internal.R.string.android_upgrading_starting_apps),
false);
} catch (RemoteException e) {
}

if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
if (!disableStorage &&
!"0".equals(SystemProperties.get("system_init.startmountservice"))) {
Expand All @@ -575,7 +561,23 @@ private void startOtherServices() {
reportWtf("starting Mount Service", e);
}
}
}

try {
mPackageManagerService.performBootDexOpt();
} catch (Throwable e) {
reportWtf("performing boot dexopt", e);
}

try {
ActivityManagerNative.getDefault().showBootMessage(
context.getResources().getText(
com.android.internal.R.string.android_upgrading_starting_apps),
false);
} catch (RemoteException e) {
}

if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
if (!disableNonCoreServices) {
try {
Slog.i(TAG, "LockSettingsService");
Expand Down

0 comments on commit e1eea11

Please sign in to comment.