use privileged ConnectivityManager API

Allows an internal user to use privileged ConnectivityManager API

Note about protection level

This permission has protection level: signatureOrSystem. It is a permission that the system grants only to applications that are in the Android system image or that are signed with the same certificate as the application that declared the permission.

*ā€¯signatureOrSystemā€¯ permissions are no longer available to all apps residing en the /system partition. Instead, there is a new /system/priv-app directory, and only apps whose APKs are in that directory are allowed to use signatureOrSystem permissions without sharing the platform cert. This will reduce the surface area for possible exploits of system- bundled applications to try to gain access to permission-guarded operations.

The ApplicationInfo.FLAG_SYSTEM flag continues to mean what it is says in the documentation: it indicates that the application apk was bundled on the /system partition. A new hidden flag FLAG_PRIVILEGED has been introduced that reflects the actual right to access these permissions.*

Privileged apps are stored in /system/priv-app folder.

Usage in AndroidManifest.xml:

<uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />

Failure obtaining that permission before use will cause crash:

... setWifiApEnabled: InvocationTarget: java.lang.reflect.InvocationTargetException, java.lang.SecurityException: ConnectivityService: Neither user 10291 nor current process has android.permission.CONNECTIVITY_INTERNAL.