Make read restricted stats accessible to shell

Make READ_RESTRICTED_STATS permission available to Shell to allow
testing it in gts.

Is the minimally scoped permission that needs to be added?
Yes, it is the only permission needed for the query api.

Test: atest GtsStatsdHostTestCases
Bug: 268248219
Change-Id: Ib6da0aa23a67fed3e62bc2adef3e43914fd39c1c
Merged-In: Ib6da0aa23a67fed3e62bc2adef3e43914fd39c1c
This commit is contained in:
Jeffrey Huang
2023-02-15 11:55:48 -08:00
parent 297aad4819
commit cab46ff505
2 changed files with 5 additions and 0 deletions

View File

@@ -508,6 +508,8 @@ applications that come with the platform
<permission name="android.permission.ACCESS_AMBIENT_CONTEXT_EVENT"/>
<!-- Permission required for CTS test - CtsTelephonyProviderTestCases -->
<permission name="android.permission.WRITE_APN_SETTINGS"/>
<!-- Permission required for GTS test - GtsStatsdHostTestCases -->
<permission name="android.permission.READ_RESTRICTED_STATS"/>
</privapp-permissions>
<privapp-permissions package="com.android.statementservice">

View File

@@ -460,6 +460,9 @@
<!-- Permission needed to test registering pull atom callbacks -->
<uses-permission android:name="android.permission.REGISTER_STATS_PULL_ATOM" />
<!-- Permission needed to test querying restricted metrics -->
<uses-permission android:name="android.permission.READ_RESTRICTED_STATS" />
<!-- Permission needed to modify settings overrideable by restore in CTS tests -->
<uses-permission android:name="android.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE" />