Rename IStatsManager to IStatsd
Bug: 146075178
Test: CTS/GTS tests
Change-Id: I08f1b5c6f67c9e510dfaa7b50737c2720e177ad9
diff --git a/libstats/pull/stats_pull_atom_callback.cpp b/libstats/pull/stats_pull_atom_callback.cpp
index 011ab76..177bbba 100644
--- a/libstats/pull/stats_pull_atom_callback.cpp
+++ b/libstats/pull/stats_pull_atom_callback.cpp
@@ -22,7 +22,7 @@
#include <android/os/BnPullAtomCallback.h>
#include <android/os/IPullAtomResultReceiver.h>
-#include <android/os/IStatsManager.h>
+#include <android/os/IStatsd.h>
#include <android/util/StatsEventParcel.h>
#include <binder/IServiceManager.h>
#include "include/stats_pull_atom_callback.h"
@@ -90,10 +90,10 @@
};
static std::mutex pullAtomMutex;
-static android::sp<android::os::IStatsManager> sStatsd = nullptr;
+static android::sp<android::os::IStatsd> sStatsd = nullptr;
static std::map<int32_t, android::sp<StatsPullAtomCallbackInternal>> mPullers;
-static android::sp<android::os::IStatsManager> getStatsServiceLocked();
+static android::sp<android::os::IStatsd> getStatsServiceLocked();
class StatsDeathRecipient : public android::IBinder::DeathRecipient {
public:
@@ -106,7 +106,7 @@
if (sStatsd) {
sStatsd = nullptr;
}
- android::sp<android::os::IStatsManager> statsService = getStatsServiceLocked();
+ android::sp<android::os::IStatsd> statsService = getStatsServiceLocked();
if (statsService == nullptr) {
return;
}
@@ -120,7 +120,7 @@
static android::sp<StatsDeathRecipient> statsDeathRecipient = new StatsDeathRecipient();
-static android::sp<android::os::IStatsManager> getStatsServiceLocked() {
+static android::sp<android::os::IStatsd> getStatsServiceLocked() {
if (!sStatsd) {
// Fetch statsd.
const android::sp<android::IBinder> binder =
@@ -129,7 +129,7 @@
return nullptr;
}
binder->linkToDeath(statsDeathRecipient);
- sStatsd = android::interface_cast<android::os::IStatsManager>(binder);
+ sStatsd = android::interface_cast<android::os::IStatsd>(binder);
}
return sStatsd;
}
@@ -146,7 +146,7 @@
}
std::lock_guard<std::mutex> lg(pullAtomMutex);
- const android::sp<android::os::IStatsManager> statsService = getStatsServiceLocked();
+ const android::sp<android::os::IStatsd> statsService = getStatsServiceLocked();
if (statsService == nullptr) {
// Error - statsd not available
return;