Add ALLOWLISTED permission to DeviceConfigApiPermissionTests

Android 16 introduces restrictions on the DeviceConfig flags that
can be modified by the shell user by removing the WRITE_DEVICE_CONFIG
permission from this user and replacing it with the
WRITE_ALLOWLISTED_DEVICE_CONFIG permission; with this permission,
only those flags that have been allowlisted can be modified. This
commit adds the ALLOWLISTED permission to the
DeviceConfigApiPermissionTests to ensure the mutator APIs behave
as expected when one of the necessary WRITE permission is granted.
This commit also adds an additional test case to verify that the
mutator APIs throw a SecurityException if the calling package only
has the ALLOWLISTED permission and attempts to modify / delete a
flag that has not been allowlisted.

Bug: 364083026
Flag: TEST_ONLY
Test: atest DeviceConfigApiPermissionTests
Change-Id: I6999944d7624ea7f8a2ec184102ef7a606482c51
1 file changed