summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author lucaslin <lucaslin@google.com> 2021-03-04 17:09:51 +0800
committer Chiachang Wang <chiachangwang@google.com> 2021-03-19 10:51:36 +0800
commit543d2ffa7f4239b3bacacfd4c9c644d9c0e270a1 (patch)
treeee12cb3a3661caf63d161ffe9e650112d6967e1d
parent026fa948aee1ca41933532086ede6fe8c249b718 (diff)
Expose constants of ConnectivityManager
The callers cannot call the hidden APIs after ConnectivityManager became a part of mainline module, so expose them for callers. Also change the value of ACTION_PROMPT_PARTIAL_CONNECTIVITY, ACTION_PROMPT_LOST_VALIDATION and ACTION_PROMPT_UNVALIDATED because of API lint errors. Bug: 172183305 Test: Check private DNS settings is normal, and test NO_INTERNET notification can be shown normally. Change-Id: I715c766ad8e5eb54f4dc67239c1dbca7239506fc
-rw-r--r--packages/Connectivity/framework/api/module-lib-current.txt3
-rw-r--r--packages/Connectivity/framework/src/android/net/ConnectivityManager.java9
2 files changed, 9 insertions, 3 deletions
diff --git a/packages/Connectivity/framework/api/module-lib-current.txt b/packages/Connectivity/framework/api/module-lib-current.txt
index 7a91f6454b90..8e9e6acb52d2 100644
--- a/packages/Connectivity/framework/api/module-lib-current.txt
+++ b/packages/Connectivity/framework/api/module-lib-current.txt
@@ -20,6 +20,9 @@ package android.net {
method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setProfileNetworkPreference(@NonNull android.os.UserHandle, int, @Nullable java.util.concurrent.Executor, @Nullable Runnable);
method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_TEST_NETWORKS, android.Manifest.permission.NETWORK_STACK}) public void simulateDataStall(int, long, @NonNull android.net.Network, @NonNull android.os.PersistableBundle);
method public void systemReady();
+ field public static final String ACTION_PROMPT_LOST_VALIDATION = "android.net.action.PROMPT_LOST_VALIDATION";
+ field public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY = "android.net.action.PROMPT_PARTIAL_CONNECTIVITY";
+ field public static final String ACTION_PROMPT_UNVALIDATED = "android.net.action.PROMPT_UNVALIDATED";
field public static final String PRIVATE_DNS_MODE_OFF = "off";
field public static final String PRIVATE_DNS_MODE_OPPORTUNISTIC = "opportunistic";
field public static final String PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = "hostname";
diff --git a/packages/Connectivity/framework/src/android/net/ConnectivityManager.java b/packages/Connectivity/framework/src/android/net/ConnectivityManager.java
index eac896c6664a..a5e38fa976d1 100644
--- a/packages/Connectivity/framework/src/android/net/ConnectivityManager.java
+++ b/packages/Connectivity/framework/src/android/net/ConnectivityManager.java
@@ -425,7 +425,8 @@ public class ConnectivityManager {
*
* @hide
*/
- public static final String ACTION_PROMPT_UNVALIDATED = "android.net.conn.PROMPT_UNVALIDATED";
+ @SystemApi(client = MODULE_LIBRARIES)
+ public static final String ACTION_PROMPT_UNVALIDATED = "android.net.action.PROMPT_UNVALIDATED";
/**
* Action used to display a dialog that asks the user whether to avoid a network that is no
@@ -433,8 +434,9 @@ public class ConnectivityManager {
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
public static final String ACTION_PROMPT_LOST_VALIDATION =
- "android.net.conn.PROMPT_LOST_VALIDATION";
+ "android.net.action.PROMPT_LOST_VALIDATION";
/**
* Action used to display a dialog that asks the user whether to stay connected to a network
@@ -443,8 +445,9 @@ public class ConnectivityManager {
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
public static final String ACTION_PROMPT_PARTIAL_CONNECTIVITY =
- "android.net.conn.PROMPT_PARTIAL_CONNECTIVITY";
+ "android.net.action.PROMPT_PARTIAL_CONNECTIVITY";
/**
* Invalid tethering type.