diff options
| author | 2018-05-03 11:19:22 -0700 | |
|---|---|---|
| committer | 2018-05-03 11:19:22 -0700 | |
| commit | c9af40a45aef72d19a17be947ab1b0b28678fb41 (patch) | |
| tree | edb7402c8dbafff7acc19d1c38ab48b2c037a495 | |
| parent | ed78622233d53b2c3ae7dc8b29b8114f989c106c (diff) | |
| parent | 91bb146dd042633d9594c3e41a25457a5cf4ae4a (diff) | |
Merge "Resets system flags when updating PackageSettings" into pi-dev am: f8f6e5af75
am: 91bb146dd0
Change-Id: Ibb8f601122bd57972eb8b03051c166e699b3d220
| -rw-r--r-- | services/core/java/com/android/server/pm/Settings.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java index 898ecf3c26d2..f8bf9c45e8b1 100644 --- a/services/core/java/com/android/server/pm/Settings.java +++ b/services/core/java/com/android/server/pm/Settings.java @@ -844,7 +844,12 @@ public final class Settings { } // If what we are scanning is a system (and possibly privileged) package, // then make it so, regardless of whether it was previously installed only - // in the data partition. + // in the data partition. Reset first. + pkgSetting.pkgFlags &= ~ApplicationInfo.FLAG_SYSTEM; + pkgSetting.pkgPrivateFlags &= ~(ApplicationInfo.PRIVATE_FLAG_PRIVILEGED + | ApplicationInfo.PRIVATE_FLAG_OEM + | ApplicationInfo.PRIVATE_FLAG_VENDOR + | ApplicationInfo.PRIVATE_FLAG_PRODUCT); pkgSetting.pkgFlags |= pkgFlags & ApplicationInfo.FLAG_SYSTEM; pkgSetting.pkgPrivateFlags |= pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED; |