From d31b35212c627806ca5845f28958f395c8be2ee3 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Thu, 11 Mar 2021 21:06:10 +0900 Subject: [PATCH] Add TEST_NETWORK_SERVICE to module API TestNetworkManager is being unbundled; the TEST_NETWORK_SERVICE constant is necessary for the module to register the manager with registerContextAwareService. Bug: 171540887 Test: m Change-Id: I0690251ddfcdaa8a34830e110b75869a370de389 --- core/api/module-lib-current.txt | 1 + core/java/android/content/Context.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index a140e8ad095ea..8f0a3297af4ae 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -61,6 +61,7 @@ package android.content { public abstract class Context { method @NonNull public android.os.UserHandle getUser(); + field public static final String TEST_NETWORK_SERVICE = "test_network"; } public class Intent implements java.lang.Cloneable android.os.Parcelable { diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index f8dd0e1452e5b..e4a6184310aae 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -4219,7 +4219,8 @@ public abstract class Context { * @see #getSystemService(String) * @hide */ - @TestApi public static final String TEST_NETWORK_SERVICE = "test_network"; + @TestApi @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) + public static final String TEST_NETWORK_SERVICE = "test_network"; /** * Use with {@link #getSystemService(String)} to retrieve a {@link