From 572c46d354d5d07d96b862fcf5684cd8a928159c Mon Sep 17 00:00:00 2001 From: paulhu Date: Fri, 7 Feb 2020 14:25:52 +0800 Subject: [PATCH] Add ACTION_TETHER_SETTINGS Tethering notification needs to launch TetherSettings when user tapped notification. But OEM can have their own Settings package. So add ACTION_TETHER_SETTINGS in Settings.java for launching TetherSettings via intent. Then OEM can launch their TetherSettings by receiving this intent. Bug: 149068177 Test: Build, Flash, manual test. Change-Id: I98f6b50b45f1f8cc1fe6dab7b2592de4611363ce --- api/system-current.txt | 1 + core/java/android/provider/Settings.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index b3dea03772d71..c7ec7573be1f4 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7072,6 +7072,7 @@ package android.provider { field public static final String ACTION_REQUEST_ENABLE_CONTENT_CAPTURE = "android.settings.REQUEST_ENABLE_CONTENT_CAPTURE"; field public static final String ACTION_SHOW_ADMIN_SUPPORT_DETAILS = "android.settings.SHOW_ADMIN_SUPPORT_DETAILS"; field public static final String ACTION_TETHER_PROVISIONING_UI = "android.settings.TETHER_PROVISIONING_UI"; + field public static final String ACTION_TETHER_SETTINGS = "android.settings.TETHER_SETTINGS"; } public static final class Settings.Global extends android.provider.Settings.NameValueTable { diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index b22db2e24624b..3842def8751df 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1792,6 +1792,19 @@ public final class Settings { @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_MANAGE_DOMAIN_URLS = "android.settings.MANAGE_DOMAIN_URLS"; + /** + * Activity Action: Show screen that let user select enable (or disable) tethering. + *

+ * Input: Nothing. + *

+ * Output: Nothing + * + * @hide + */ + @SystemApi + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_TETHER_SETTINGS = "android.settings.TETHER_SETTINGS"; + /** * Broadcast to trigger notification of asking user to enable MMS. * Need to specify {@link #EXTRA_ENABLE_MMS_DATA_REQUEST_REASON} and {@link #EXTRA_SUB_ID}.