summaryrefslogtreecommitdiff
path: root/cmds/statsd/src/StatsService.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/statsd/src/StatsService.h')
-rw-r--r--cmds/statsd/src/StatsService.h49
1 files changed, 20 insertions, 29 deletions
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
index de55ca9c38cd..f2079d9f278f 100644
--- a/cmds/statsd/src/StatsService.h
+++ b/cmds/statsd/src/StatsService.h
@@ -30,6 +30,7 @@
#include <android/frameworks/stats/1.0/IStats.h>
#include <android/frameworks/stats/1.0/types.h>
#include <android/os/BnStatsd.h>
+#include <android/os/IPendingIntentRef.h>
#include <android/os/IStatsCompanionService.h>
#include <android/os/IStatsd.h>
#include <binder/IResultReceiver.h>
@@ -98,15 +99,14 @@ public:
* Binder call for clients to request data for this configuration key.
*/
virtual Status getData(int64_t key,
- const String16& packageName,
+ const int32_t callingUid,
vector<uint8_t>* output) override;
/**
* Binder call for clients to get metadata across all configs in statsd.
*/
- virtual Status getMetadata(const String16& packageName,
- vector<uint8_t>* output) override;
+ virtual Status getMetadata(vector<uint8_t>* output) override;
/**
@@ -115,53 +115,52 @@ public:
*/
virtual Status addConfiguration(int64_t key,
const vector<uint8_t>& config,
- const String16& packageName) override;
+ const int32_t callingUid) override;
/**
* Binder call to let clients register the data fetch operation for a configuration.
*/
virtual Status setDataFetchOperation(int64_t key,
- const sp<android::IBinder>& intentSender,
- const String16& packageName) override;
+ const sp<IPendingIntentRef>& pir,
+ const int32_t callingUid) override;
/**
* Binder call to remove the data fetch operation for the specified config key.
*/
virtual Status removeDataFetchOperation(int64_t key,
- const String16& packageName) override;
+ const int32_t callingUid) override;
/**
* Binder call to let clients register the active configs changed operation.
*/
- virtual Status setActiveConfigsChangedOperation(const sp<android::IBinder>& intentSender,
- const String16& packageName,
+ virtual Status setActiveConfigsChangedOperation(const sp<IPendingIntentRef>& pir,
+ const int32_t callingUid,
vector<int64_t>* output) override;
/**
* Binder call to remove the active configs changed operation for the specified package..
*/
- virtual Status removeActiveConfigsChangedOperation(const String16& packageName) override;
+ virtual Status removeActiveConfigsChangedOperation(const int32_t callingUid) override;
/**
* Binder call to allow clients to remove the specified configuration.
*/
virtual Status removeConfiguration(int64_t key,
- const String16& packageName) override;
+ const int32_t callingUid) override;
/**
- * Binder call to associate the given config's subscriberId with the given intentSender.
- * intentSender must be convertible into an IntentSender (in Java) using IntentSender(IBinder).
+ * Binder call to associate the given config's subscriberId with the given pendingIntentRef.
*/
virtual Status setBroadcastSubscriber(int64_t configId,
int64_t subscriberId,
- const sp<android::IBinder>& intentSender,
- const String16& packageName) override;
+ const sp<IPendingIntentRef>& pir,
+ const int32_t callingUid) override;
/**
- * Binder call to unassociate the given config's subscriberId with any intentSender.
+ * Binder call to unassociate the given config's subscriberId with any pendingIntentRef.
*/
virtual Status unsetBroadcastSubscriber(int64_t configId,
int64_t subscriberId,
- const String16& packageName) override;
+ const int32_t callingUid) override;
/** Inform statsCompanion that statsd is ready. */
virtual void sayHiToStatsCompanion();
@@ -172,14 +171,6 @@ public:
virtual Status sendAppBreadcrumbAtom(int32_t label, int32_t state) override;
/**
- * Binder call to register a callback function for a vendor pulled atom.
- * Note: this atom must NOT have uid as a field.
- */
- virtual Status registerPullerCallback(int32_t atomTag,
- const sp<android::os::IStatsPullerCallback>& pullerCallback,
- const String16& packageName) override;
-
- /**
* Binder call to register a callback function for a pulled atom.
*/
virtual Status registerPullAtomCallback(int32_t uid, int32_t atomTag, int64_t coolDownNs,
@@ -194,14 +185,14 @@ public:
const sp<android::os::IPullAtomCallback>& pullerCallback) override;
/**
- * Binder call to unregister any existing callback function for a vendor pulled atom.
+ * Binder call to unregister any existing callback for the given uid and atom.
*/
- virtual Status unregisterPullerCallback(int32_t atomTag, const String16& packageName) override;
+ virtual Status unregisterPullAtomCallback(int32_t uid, int32_t atomTag) override;
/**
- * Binder call to unregister any existing callback for the given uid and atom.
+ * Binder call to unregister any existing callback for the given atom and calling uid.
*/
- virtual Status unregisterPullAtomCallback(int32_t uid, int32_t atomTag) override;
+ virtual Status unregisterNativePullAtomCallback(int32_t atomTag) override;
/**
* Binder call to log BinaryPushStateChanged atom.