Enforce permission when disabling API checks.

Add a new internal permission required to disable hidden API checks using
"am instrument". Grant this permission to the shell.

Test: $ adb shell am instrument --no-hidden-api-checks mypackage/.MainInstrumentation
Bug: 64382372

Change-Id: I193dba412560f17810ad0c67c733a1eec15fa7b7
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index c5ab2e6..da494d4 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3943,6 +3943,11 @@
     <permission android:name="android.permission.OPEN_APPLICATION_DETAILS_OPEN_BY_DEFAULT_PAGE"
                 android:protectionLevel="signature" />
 
+    <!-- Allows hidden API checks to be disabled when starting a process.
+         @hide <p>Not for use by third-party applications. -->
+    <permission android:name="android.permission.DISABLE_HIDDEN_API_CHECKS"
+                android:protectionLevel="signature" />
+
     <application android:process="system"
                  android:persistent="true"
                  android:hasCode="false"