Apply default link-handling policy at OTA from pre-M
Not just at first (wiped) boot. Bug 23744303 Change-Id: I9ab42f7b081e92231d89b3c97935135c3dd901d4
This commit is contained in:
@@ -2283,16 +2283,16 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
}
|
||||
updatePermissionsLPw(null, null, updateFlags);
|
||||
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
|
||||
// we need to initialize the default preferred apps.
|
||||
if (!mRestoredSettings && !onlyCore) {
|
||||
mSettings.applyDefaultPreferredAppsLPw(this, UserHandle.USER_OWNER);
|
||||
applyFactoryDefaultBrowserLPw(UserHandle.USER_OWNER);
|
||||
primeDomainVerificationsLPw(UserHandle.USER_OWNER);
|
||||
// If this is the first boot or an update from pre-M, and it is a normal
|
||||
// boot, then we need to initialize the default preferred apps across
|
||||
// all defined users.
|
||||
if (!onlyCore && (mPromoteSystemApps || !mRestoredSettings)) {
|
||||
for (UserInfo user : sUserManager.getUsers(true)) {
|
||||
mSettings.applyDefaultPreferredAppsLPw(this, user.id);
|
||||
applyFactoryDefaultBrowserLPw(user.id);
|
||||
primeDomainVerificationsLPw(user.id);
|
||||
}
|
||||
}
|
||||
|
||||
// If this is first boot after an OTA, and a normal boot, then
|
||||
@@ -2310,6 +2310,10 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
|
||||
checkDefaultBrowser();
|
||||
|
||||
// clear only after permissions and other defaults have been updated
|
||||
mExistingSystemPackages.clear();
|
||||
mPromoteSystemApps = false;
|
||||
|
||||
// All the changes are done during package scanning.
|
||||
ver.databaseVersion = Settings.CURRENT_DATABASE_VERSION;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user