All apps have 'null' feature

If this feature is not added explicitly the 'null' counts are reset on
reboot.

Fixes: 150519372
Test: Rebooted and saw null accesses afterwards
Change-Id: Ie1faa321009023b077b226512223fddc8c84e1ca
This commit is contained in:
Philip P. Moltmann
2020-02-29 09:00:07 -08:00
parent bba804e8f5
commit ebc50d8acf

View File

@@ -1445,6 +1445,7 @@ public class AppOpsService extends IAppOpsService.Stub {
ArrayMap<String, String> dstFeatureIds = new ArrayMap<>();
ArraySet<String> featureIds = new ArraySet<>();
featureIds.add(null);
if (pkg.getFeatures() != null) {
int numFeatures = pkg.getFeatures().size();
for (int featureNum = 0; featureNum < numFeatures; featureNum++) {