From 38b5060d6647c550e02a9ae46228ae0c230ad11d Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Fri, 15 Jan 2021 22:06:20 +0900 Subject: [PATCH] Add MANAGE_TEST_NETWORKS to system API The system and particularly mainline modules need to reference the API constant so they can verify that callers have the permission. Bug: 174436414 Test: m Merged-In: I9f41f888fbd4b7605d750110b345005a5cba85d1 Change-Id: I9f41f888fbd4b7605d750110b345005a5cba85d1 --- core/api/system-current.txt | 1 + core/api/test-current.txt | 2 +- core/res/AndroidManifest.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 9f41c139a46a1..bbbe05d9e9702 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -126,6 +126,7 @@ package android { field public static final String MANAGE_SENSOR_PRIVACY = "android.permission.MANAGE_SENSOR_PRIVACY"; field public static final String MANAGE_SOUND_TRIGGER = "android.permission.MANAGE_SOUND_TRIGGER"; field public static final String MANAGE_SUBSCRIPTION_PLANS = "android.permission.MANAGE_SUBSCRIPTION_PLANS"; + field public static final String MANAGE_TEST_NETWORKS = "android.permission.MANAGE_TEST_NETWORKS"; field public static final String MANAGE_USB = "android.permission.MANAGE_USB"; field public static final String MANAGE_USERS = "android.permission.MANAGE_USERS"; field public static final String MANAGE_USER_OEM_UNLOCK_STATE = "android.permission.MANAGE_USER_OEM_UNLOCK_STATE"; diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 9cf9ce45602b8..bd5dd0cfe4161 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -981,7 +981,7 @@ package android.media.tv { package android.net { public class ConnectivityManager { - method @RequiresPermission(anyOf={"android.permission.MANAGE_TEST_NETWORKS", android.Manifest.permission.NETWORK_STACK}) public void simulateDataStall(int, long, @NonNull android.net.Network, @NonNull android.os.PersistableBundle); + 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); } public class EthernetManager { diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 714a09d022648..c81994f6864e7 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1622,7 +1622,7 @@ -