summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/current.txt1
-rw-r--r--core/java/android/content/pm/PackageManager.java23
2 files changed, 24 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index 46318ae6f7ef..ced2e853d74b 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -12079,6 +12079,7 @@ package android.content.pm {
field public static final int PERMISSION_DENIED = -1; // 0xffffffff
field public static final int PERMISSION_GRANTED = 0; // 0x0
field public static final String PROPERTY_MEDIA_CAPABILITIES = "android.media.PROPERTY_MEDIA_CAPABILITIES";
+ field public static final String PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES = "android.net.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES";
field public static final int SIGNATURE_FIRST_NOT_SIGNED = -1; // 0xffffffff
field public static final int SIGNATURE_MATCH = 0; // 0x0
field public static final int SIGNATURE_NEITHER_SIGNED = 1; // 0x1
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index f1e37243003c..bf139bdd300e 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -151,6 +151,29 @@ public abstract class PackageManager {
"android.media.PROPERTY_MEDIA_CAPABILITIES";
/**
+ * <application> level {@link android.content.pm.PackageManager.Property} tag
+ * specifying the XML resource ID containing the declaration of the self-certified network
+ * capabilities used by the application.
+ *
+ * <p> Starting from Android 14, usage of some network capabilities in
+ * {@link android.net.ConnectivityManager#requestNetwork} require the application to
+ * declare its usage of that particular capability in this resource. Only some capabilities
+ * require a declaration. Please look up the specific capability you want to use in
+ * {@link android.net.NetworkCapabilities} to see if it needs declaration in this property.
+ *
+ * For example:
+ * &lt;application&gt;
+ * &lt;property android:name="android.net.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES"
+ * android:resource="@xml/self_certified_network_capabilities"&gt;
+ * &lt;application&gt;
+ *
+ * <p> The detail format of self_certified_network_capabilities.xml is described in
+ * {@link android.net.NetworkRequest}
+ */
+ public static final String PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES =
+ "android.net.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES";
+
+ /**
* Application level property that an app can specify to opt-out from having private data
* directories both on the internal and external storages.
*