Merge "Fix a leak in HasSystemFeatureCache." into rvc-dev
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 969ea70..87d33a9 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -99,6 +99,7 @@
import android.view.Display;
import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.Immutable;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.UserIcons;
@@ -612,7 +613,11 @@
return hasSystemFeature(name, 0);
}
- private class HasSystemFeatureQuery {
+ /**
+ * Identifies a single hasSystemFeature query.
+ */
+ @Immutable
+ private static final class HasSystemFeatureQuery {
public final String name;
public final int version;
public HasSystemFeatureQuery(String n, int v) {