Merge "Fix bug in initializing preferred activities." into jb-mr2-dev

This commit is contained in:
Dianne Hackborn
2013-04-02 19:01:18 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 3 deletions

View File

@@ -1323,6 +1323,12 @@ public class PackageManagerService extends IPackageManager.Stub {
? (UPDATE_PERMISSIONS_REPLACE_PKG|UPDATE_PERMISSIONS_REPLACE_ALL)
: 0));
// If this is the first boot, and it is a normal boot, then
// we need to initialize the default preferred apps.
if (!mRestoredSettings && !onlyCore) {
mSettings.readDefaultPreferredAppsLPw(this, 0);
}
// can downgrade to reader
mSettings.writeLPr();

View File

@@ -1603,9 +1603,6 @@ final class Settings {
mReadMessages.append("No settings file found\n");
PackageManagerService.reportSettingsProblem(Log.INFO,
"No settings file; creating initial state");
if (!onlyCore) {
readDefaultPreferredAppsLPw(service, 0);
}
mInternalSdkPlatform = mExternalSdkPlatform = sdkVersion;
return false;
}