Add INTERACT_ACROSS_USERS_FULL to test for setCurrentProxyScriptUrl am: d9639a9bf4

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15426434

Change-Id: I6ec322a0997468f8f27cc390b284e7762f762856
This commit is contained in:
Aaron Huang
2021-07-30 10:17:01 +00:00
committed by Automerger Merge Worker

View File

@@ -16,6 +16,7 @@
package android.net.cts;
import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
import static android.Manifest.permission.NETWORK_SETTINGS;
import static com.android.testutils.TestPermissionUtil.runAsShell;
@@ -168,7 +169,9 @@ public final class PacProxyManagerTest {
mContext.registerReceiver(receiver, new IntentFilter(Proxy.PROXY_CHANGE_ACTION));
// Call setCurrentProxyScriptUrl with the URL of the pac file.
runAsShell(NETWORK_SETTINGS, () -> {
// Note that the proxy script is global to device, and setting it from a different user
// should require INTERACT_ACROSS_USERS_FULL permission which the Settings app has.
runAsShell(NETWORK_SETTINGS, INTERACT_ACROSS_USERS_FULL, () -> {
mPacProxyManager.setCurrentProxyScriptUrl(proxy);
});