summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mark Chien <markchien@google.com> 2020-01-13 20:22:16 -0800
committer android-build-merger <android-build-merger@google.com> 2020-01-13 20:22:16 -0800
commitc5dfc3ca1be46d89ceec597eb1a11a29d16d9f3b (patch)
tree7c29d508ac05c36bdddd80ae0f1e00b270715387
parent20bdbf40c009d108fbb90857bf76759baf45da1b (diff)
parent55962277bf7337dae7deffa87e3d19cf575e9587 (diff)
Merge "Add NETWORK_STACK_SERVICE to SystemServiceRegistry"
am: 55962277bf Change-Id: I83c6549b1781ce4161609474ee59f848cc7640c6
-rwxr-xr-xapi/system-current.txt1
-rw-r--r--api/test-current.txt1
-rw-r--r--core/java/android/app/SystemServiceRegistry.java8
-rw-r--r--core/java/android/content/Context.java4
4 files changed, 13 insertions, 1 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 7d9cf5f31b9d..0bc0c9033281 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -1573,6 +1573,7 @@ package android.content {
field public static final String NETD_SERVICE = "netd";
field public static final String NETWORK_POLICY_SERVICE = "netpolicy";
field public static final String NETWORK_SCORE_SERVICE = "network_score";
+ field public static final String NETWORK_STACK_SERVICE = "network_stack";
field public static final String OEM_LOCK_SERVICE = "oem_lock";
field public static final String PERMISSION_SERVICE = "permission";
field public static final String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block";
diff --git a/api/test-current.txt b/api/test-current.txt
index 9b702bb6a7ef..176ecc935e67 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -651,6 +651,7 @@ package android.content {
method public void setContentCaptureOptions(@Nullable android.content.ContentCaptureOptions);
field public static final String BUGREPORT_SERVICE = "bugreport";
field public static final String CONTENT_CAPTURE_MANAGER_SERVICE = "content_capture";
+ field public static final String NETWORK_STACK_SERVICE = "network_stack";
field public static final String PERMISSION_SERVICE = "permission";
field public static final String ROLLBACK_SERVICE = "rollback";
field public static final String STATUS_BAR_SERVICE = "statusbar";
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 82df702eb7e5..88976e182e6d 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -341,6 +341,14 @@ final class SystemServiceRegistry {
}
});
+ registerService(Context.NETWORK_STACK_SERVICE, IBinder.class,
+ new StaticServiceFetcher<IBinder>() {
+ @Override
+ public IBinder createService() {
+ return ServiceManager.getService(Context.NETWORK_STACK_SERVICE);
+ }
+ });
+
registerService(Context.TETHERING_SERVICE, TetheringManager.class,
new CachedServiceFetcher<TetheringManager>() {
@Override
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 0228b10b66c7..f2f905126715 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3851,10 +3851,12 @@ public abstract class Context {
/**
* Use with {@link android.os.ServiceManager.getService()} to retrieve a
- * {@link NetworkStackClient} IBinder for communicating with the network stack
+ * {@link INetworkStackConnector} IBinder for communicating with the network stack
* @hide
* @see NetworkStackClient
*/
+ @SystemApi
+ @TestApi
public static final String NETWORK_STACK_SERVICE = "network_stack";
/**