Statsd namespace is defined and used
Statsd code now lives in android::os::statsd namespace. Existing files
are largely modified to follow this convention.
Exception: parse_util, since it seems a bit different.
Test: code compiles and existing statsd_tests still pass
Change-Id: Idf92a071b9ed172d01eb3087a4fa3609d67a038c
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
index 467c2bd..57276d2 100644
--- a/cmds/statsd/src/StatsService.h
+++ b/cmds/statsd/src/StatsService.h
@@ -34,12 +34,12 @@
using namespace android::base;
using namespace android::binder;
using namespace android::os;
-using namespace android::os::statsd;
using namespace std;
-using android::os::statsd::StatsdConfig;
+namespace android {
+namespace os {
+namespace statsd {
-// ================================================================================
class StatsService : public BnStatsManager {
public:
StatsService(const sp<Looper>& handlerLooper);
@@ -69,15 +69,14 @@
private:
sp<StatsLogProcessor> m_processor; // Reference to the processor for updating configs.
+ const sp<AnomalyMonitor> mAnomalyMonitor; // TODO: Move this to a more logical file/class
+
status_t doPrintStatsLog(FILE* out, const Vector<String8>& args);
void printCmdHelp(FILE* out);
status_t doLoadConfig(FILE* in);
- const sp<AnomalyMonitor> mAnomalyMonitor; // TODO: Move this to a more logical file/class
-
- private:
/** Fetches the StatsCompanionService. */
sp<IStatsCompanionService> getStatsCompanionService();
};
@@ -95,4 +94,8 @@
const sp<AnomalyMonitor> mAnmlyMntr;
};
+} // namespace statsd
+} // namespace os
+} // namespace android
+
#endif // STATS_SERVICE_H