Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add new permissions to Android platform.
To add a new permission to Android modify the frameworks/base/core/res/AndroidManifest.xml file. Make sure you add the strings too. After rebuilding check that the api/current.txt file was updated to include the new permissions.
<!-- Allows an application to write the company system settings. -->
<permission android:name="android.permission.WRITE_COMPANY_SETTINGS"
android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
android:protectionLevel="signature|system|development"
android:label="@string/permlab_writeCompanySettings"
android:description="@string/permdesc_writeCompanySettings" />
<!-- Allows an application to read the company system settings. -->
<permission android:name="android.permission.READ_COMPANY_SETTINGS"
android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
android:protectionLevel="signature|system|development"
android:label="@string/permlab_readCompanySettings"
android:description="@string/permdesc_readCompanySettings" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment