Clear tags for packages with no attribution info

Packages without attribution info should allow all attribution tags. Fix
a bug in setting the user restriction to allow this.

Bug: 187421886
Test: manual
Change-Id: I1d28951094e4731fdce05278e491d1500a3c1259
This commit is contained in:
Soonil Nagarkar
2021-05-18 15:39:26 -07:00
parent c5b3080f82
commit 40baa836d2

View File

@@ -1420,9 +1420,9 @@ public class LocationManagerService extends ILocationManager.Stub implements
}
for (String packageName :
mInjector.getSettingsHelper().getIgnoreSettingsPackageWhitelist()) {
packages.computeIfAbsent(packageName, k -> new ArraySet<>());
packages.computeIfAbsent(packageName, k -> new ArraySet<>()).clear();
}
packages.computeIfAbsent(mContext.getPackageName(), k -> new ArraySet<>());
packages.computeIfAbsent(mContext.getPackageName(), k -> new ArraySet<>()).clear();
allowedPackages = new ArrayMap<>();
for (Map.Entry<String, ArraySet<String>> entry : packages.entrySet()) {