Pull dangerous permission state as atom
Pull all state for all dangerous permissions of all apps.
Test: adb shell cmd stats pull-source 10050
atest CtsStatsdHostTestCases:android.cts.statsd.atom.UidAtomTests#testDangerousPermissionState
Bug: 123661303, 123594188
Change-Id: I4060282f58220ea514b13865d7cad04e10af90e4
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 9a6387a..70792b7 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -291,6 +291,7 @@
DebugFailingElapsedClock debug_failing_elapsed_clock = 10047;
NumBiometricsEnrolled num_faces_enrolled = 10048;
RoleHolder role_holder = 10049;
+ DangerousPermissionState dangerous_permission_state = 10050;
}
// DO NOT USE field numbers above 100,000 in AOSP.
@@ -5361,3 +5362,20 @@
optional string hosting_name = 9;
}
+/**
+ * State of a dangerous permission requested by a package
+ */
+message DangerousPermissionState {
+ // Name of the permission
+ optional string permission_name = 1;
+
+ // Uid of the package
+ optional int32 uid = 2 [(is_uid) = true];
+
+ // Package requesting the permission
+ optional string package_name = 3;
+
+ // If the permission is granted to the uid
+ optional bool is_granted = 4;
+}
+