From 8196687d396874a088458da1e9d8757337dd6fbc Mon Sep 17 00:00:00 2001 From: Tej Singh Date: Tue, 17 Mar 2020 11:00:17 -0700 Subject: [PATCH] Enforce permission in native puller API. Test: m Test: No security exceptions on boot Bug: 148955001 Change-Id: If196a82bf5a54ee15557825e16f70b5f64f45412 --- libstats/pull/include/stats_pull_atom_callback.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libstats/pull/include/stats_pull_atom_callback.h b/libstats/pull/include/stats_pull_atom_callback.h index ad9b04edc..0b0df2b82 100644 --- a/libstats/pull/include/stats_pull_atom_callback.h +++ b/libstats/pull/include/stats_pull_atom_callback.h @@ -112,6 +112,8 @@ typedef AStatsManager_PullAtomCallbackReturn (*AStatsManager_PullAtomCallback)( * invoke the callback when the stats service determines that this atom needs to be * pulled. * + * Requires the REGISTER_STATS_PULL_ATOM permission. + * * \param atom_tag The tag of the atom for this pull atom callback. * \param metadata Optional metadata specifying the timeout, cool down time, and * additive fields for mapping isolated to host uids. @@ -128,6 +130,8 @@ void AStatsManager_registerPullAtomCallback(int32_t atom_tag, * Unregisters a callback for an atom when that atom is to be pulled. Note that any ongoing * pulls will still occur. * + * Requires the REGISTER_STATS_PULL_ATOM permission. + * * \param atomTag The tag of the atom of which to unregister */ void AStatsManager_unregisterPullAtomCallback(int32_t atom_tag);