From 5996288d674929de32c3889b88095a6bed84c349 Mon Sep 17 00:00:00 2001 From: Kangping Dong Date: Mon, 21 Aug 2023 19:01:26 +0800 Subject: [Thread] define the THREAD_NETWORK_SERVICE Bug: 296830638 Merged-In: Iaa1b6973b2fc86886db784e5d37e804daea854e8 Change-Id: Ie2ce6913de8300069ce340c8b62d6fd3e97ea96e --- core/api/system-current.txt | 1 + core/java/android/content/Context.java | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index c893b5432269..609195d86fc9 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -2975,6 +2975,7 @@ package android.content { field public static final String SYSTEM_CONFIG_SERVICE = "system_config"; field public static final String SYSTEM_UPDATE_SERVICE = "system_update"; field public static final String TETHERING_SERVICE = "tethering"; + field public static final String THREAD_NETWORK_SERVICE = "thread_network"; field public static final String TRANSLATION_MANAGER_SERVICE = "translation"; field public static final String UI_TRANSLATION_SERVICE = "ui_translation"; field public static final String UWB_SERVICE = "uwb"; diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 21d4b6461214..57c956de2102 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -3825,6 +3825,7 @@ public abstract class Context { VIBRATOR_MANAGER_SERVICE, VIBRATOR_SERVICE, //@hide: STATUS_BAR_SERVICE, + THREAD_NETWORK_SERVICE, CONNECTIVITY_SERVICE, PAC_PROXY_SERVICE, VCN_MANAGEMENT_SERVICE, @@ -4494,6 +4495,20 @@ public abstract class Context { @SystemApi public static final String TETHERING_SERVICE = "tethering"; + /** + * Use with {@link #getSystemService(String)} to retrieve a + * {@link android.net.thread.ThreadNetworkManager}. + * + *

On devices without {@link PackageManager#FEATURE_THREAD_NETWORK} system feature + * the {@link #getSystemService(String)} will return {@code null}. + * + * @see #getSystemService(String) + * @see android.net.thread.ThreadNetworkManager + * @hide + */ + @SystemApi + public static final String THREAD_NETWORK_SERVICE = "thread_network"; + /** * Use with {@link #getSystemService(String)} to retrieve a * {@link android.net.IpSecManager} for encrypting Sockets or Networks with -- cgit v1.2.3-59-g8ed1b