Make pull atom permission accessible to shell
Make REGISTER_STATS_PULL_ATOM 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 to register pulled atoms.
What options did you explore that did not need this permission?
I explored expanding the permission to be development in addition to
privileged, and giving the permission to gmscore. However, this solution
was recommended to me by the GTS team. If there are better ways to enable
testing the API in GTS, I am open to feedback.
Test: atest GtsStatsdHostTestCases
Bug: 150329323
Change-Id: I103d937842beaa2d918181b1a952d27179411dcc
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index ef7f167..181e0c0 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -272,6 +272,9 @@
<!-- Permission needed to read wifi network credentials for CtsNetTestCases -->
<uses-permission android:name="android.permission.READ_WIFI_CREDENTIAL" />
+ <!-- Permission needed to test registering pull atom callbacks -->
+ <uses-permission android:name="android.permission.REGISTER_STATS_PULL_ATOM" />
+
<application android:label="@string/app_label"
android:theme="@android:style/Theme.DeviceDefault.DayNight"
android:defaultToDeviceProtectedStorage="true"