From ebc50d8acff62667e174f985a4886611d826235d Mon Sep 17 00:00:00 2001 From: "Philip P. Moltmann" Date: Sat, 29 Feb 2020 09:00:07 -0800 Subject: [PATCH] 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 --- services/core/java/com/android/server/appop/AppOpsService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java index c15360b00d518..f1bc6822aa4d8 100644 --- a/services/core/java/com/android/server/appop/AppOpsService.java +++ b/services/core/java/com/android/server/appop/AppOpsService.java @@ -1445,6 +1445,7 @@ public class AppOpsService extends IAppOpsService.Stub { ArrayMap dstFeatureIds = new ArrayMap<>(); ArraySet featureIds = new ArraySet<>(); + featureIds.add(null); if (pkg.getFeatures() != null) { int numFeatures = pkg.getFeatures().size(); for (int featureNum = 0; featureNum < numFeatures; featureNum++) {