Fix bug in permission grant metrics.
We should log the number of Uris granted instead of incorrectly
claiming we only granted "1" in all cases.
Bug: 155346967
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I2424ac218f8a91dd9479c31383007ed721205663
diff --git a/src/com/android/providers/media/PermissionActivity.java b/src/com/android/providers/media/PermissionActivity.java
index 0696ef5..3f97464 100644
--- a/src/com/android/providers/media/PermissionActivity.java
+++ b/src/com/android/providers/media/PermissionActivity.java
@@ -182,7 +182,7 @@
protected Void doInBackground(Void... params) {
Log.d(TAG, "User allowed grant for " + uris);
Metrics.logPermissionGranted(volumeName, appInfo.uid,
- getCallingPackage(), 1);
+ getCallingPackage(), uris.size());
try {
switch (getIntent().getAction()) {
case MediaStore.CREATE_WRITE_REQUEST_CALL: {