From 0d00aef643291db02d7d6c612b290f85ca2a90cb 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 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 473a2808cd00a..7494d89b886f8 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -135,6 +135,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_TIME_AND_ZONE_DETECTION = "android.permission.MANAGE_TIME_AND_ZONE_DETECTION"; field public static final String MANAGE_USB = "android.permission.MANAGE_USB"; field public static final String MANAGE_USERS = "android.permission.MANAGE_USERS"; diff --git a/core/api/test-current.txt b/core/api/test-current.txt index c03461aa77422..69e110e4775a4 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -1150,7 +1150,7 @@ package android.media.tv.tuner { 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 30535185bdae3..5c7858c11cb31 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1688,7 +1688,7 @@ -