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

* commit '60aae166e99dff0dba379e14c0fc43e89fd1a018':
  Apply default link-handling policy at OTA from pre-M
This commit is contained in:
Christopher Tate
2015-09-02 20:57:28 +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;