OSDN Git Service

Add MANAGE_TEST_NETWORKS permission as @hide
authorBenedict Wong <benedictwong@google.com>
Fri, 15 Feb 2019 20:11:17 +0000 (12:11 -0800)
committerBenedict Wong <benedictwong@google.com>
Wed, 13 Mar 2019 00:44:04 +0000 (00:44 +0000)
This commit adds a new permission for test networks, granted to the
shell permission identity.

Bug: 124519473
Test: In-progress CTS tests
Change-Id: I995b93a66d283b9e37381b616843dd44dbafe319

core/res/AndroidManifest.xml
packages/Shell/AndroidManifest.xml

index 35bc46a..3d0b12d 100644 (file)
     <permission android:name="android.permission.MANAGE_IPSEC_TUNNELS"
         android:protectionLevel="signature|appop" />
 
+    <!-- @hide Allows apps to create and manage Test Networks.
+         <p>Granted only to shell. CTS tests will use
+         UiAutomation.AdoptShellPermissionIdentity() to gain access.
+    -->
+    <permission android:name="android.permission.MANAGE_TEST_NETWORKS"
+        android:protectionLevel="signature" />
+
     <!-- @SystemApi @hide Allows applications to read Wi-Fi credential.
          <p>Not for use by third-party applications. -->
     <permission android:name="android.permission.READ_WIFI_CREDENTIAL"
index 40c8b01..2687c68 100644 (file)
 
     <uses-permission android:name="android.permission.CONTROL_KEYGUARD" />
 
+    <!-- Permission needed to run network tests in CTS -->
+    <uses-permission android:name="android.permission.MANAGE_TEST_NETWORKS" />
+
     <application android:label="@string/app_label"
                  android:defaultToDeviceProtectedStorage="true"
                  android:directBootAware="true">