From 010a8e066726b52197fad503f86891da3f827f6b Mon Sep 17 00:00:00 2001 From: lucaslin Date: Wed, 16 Jun 2021 17:45:32 +0800 Subject: [PATCH] Add OBSERVE_NETWORK_POLICY for shell to test CTS Both of NetworkPolicyManager#isUidNetworkingBlocked() and NetworkPolicyManager#isUidRestrictedOnMeteredNetworks() are required OBSERVE_NETWORK_POLICY but OBSERVE_NETWORK_POLICY is a signature permission that CTS cannot acquire. So add this permission for shell and call these 2 APIs with shell identity to fix the problem. Bug: 176289731 Test: atest CtsHostsideNetworkTests:HostsideNetworkPolicyManagerTests Change-Id: Iba7321c82e1a3ed773f99ccd4b9e3c24c607353f --- packages/Shell/AndroidManifest.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index eaf8184b8cdf8..2b7a579213d34 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -394,6 +394,9 @@ + + +