From 81b55fbe8c5450fc37693ba609981d4bdeb5b671 Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Wed, 14 Apr 2021 18:33:58 +0800 Subject: [PATCH] Add CONNECTIVITY_USE_RESTRICTED_NETWORKS permission to shell The shell *already had* the privileges granted by this permission due to specific code in netd, and it lost those privileges when it gained the CHANGE_NETWORK_STATE permission. Explicitly add CONNECTIVITY_USE_RESTRICTED_NETWORKS so that it can obtain sufficient permission in netd no matter CHANGE_NETWORK_STATE is set or not. Remove a duplicate row by the way. Bug: 185071689 Test: atest NetdClientTest#protectFromVpnTcp6 Change-Id: I64bc321de2c83378ce7bc8d9eb3044ae7772faca --- data/etc/privapp-permissions-platform.xml | 2 +- packages/Shell/AndroidManifest.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml index 4d418c36b50e3..460eca2a5a34e 100644 --- a/data/etc/privapp-permissions-platform.xml +++ b/data/etc/privapp-permissions-platform.xml @@ -468,7 +468,7 @@ applications that come with the platform - + diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index 9a3b76fbd653f..7b7bec7216279 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -391,6 +391,9 @@ + + +