am 7bae31f8: am 60aae166: Apply default link-handling policy at OTA from pre-M

* commit '7bae31f88f8dcaf8114d9d43b29e154bc23374ad':
  Apply default link-handling policy at OTA from pre-M
This commit is contained in:
Christopher Tate
2015-09-02 21:11:34 +00:00
committed by Android Git Automerger

View File

@@ -2283,16 +2283,16 @@ public class PackageManagerService extends IPackageManager.Stub {
} }
updatePermissionsLPw(null, null, updateFlags); updatePermissionsLPw(null, null, updateFlags);
ver.sdkVersion = mSdkVersion; ver.sdkVersion = mSdkVersion;
// clear only after permissions have been updated
mExistingSystemPackages.clear();
mPromoteSystemApps = false;
// If this is the first boot, and it is a normal boot, then // If this is the first boot or an update from pre-M, and it is a normal
// we need to initialize the default preferred apps. // boot, then we need to initialize the default preferred apps across
if (!mRestoredSettings && !onlyCore) { // all defined users.
mSettings.applyDefaultPreferredAppsLPw(this, UserHandle.USER_OWNER); if (!onlyCore && (mPromoteSystemApps || !mRestoredSettings)) {
applyFactoryDefaultBrowserLPw(UserHandle.USER_OWNER); for (UserInfo user : sUserManager.getUsers(true)) {
primeDomainVerificationsLPw(UserHandle.USER_OWNER); mSettings.applyDefaultPreferredAppsLPw(this, user.id);
applyFactoryDefaultBrowserLPw(user.id);
primeDomainVerificationsLPw(user.id);
}
} }
// If this is first boot after an OTA, and a normal boot, then // If this is first boot after an OTA, and a normal boot, then
@@ -2310,6 +2310,10 @@ public class PackageManagerService extends IPackageManager.Stub {
checkDefaultBrowser(); checkDefaultBrowser();
// clear only after permissions and other defaults have been updated
mExistingSystemPackages.clear();
mPromoteSystemApps = false;
// All the changes are done during package scanning. // All the changes are done during package scanning.
ver.databaseVersion = Settings.CURRENT_DATABASE_VERSION; ver.databaseVersion = Settings.CURRENT_DATABASE_VERSION;