Captures metrics on disk when devices reboot and shutdown. Specifically,
1. Create intent receiver in StatsCompanionService to listen to shutdown
events.
2. Create StatsWriter class to handle disk writes and deleting files.
3. Update StatsLogProcessor, ConfigManager, and StatsService to handle
files on disk using StatsWriter.
4. Add a wrapper for ConfigMetricsReport.
Still TODO is to be able to add a guardrail to prevent accumulating
excessive amount files on disk, which will be followed up by another
change.
Test: statsd, statsd_test
Change-Id: Ia0b3af315af545daa8b0078b3700c600aa7c285f
diff --git a/cmds/statsd/Android.mk b/cmds/statsd/Android.mk
index fd9465d..4d975fc 100644
--- a/cmds/statsd/Android.mk
+++ b/cmds/statsd/Android.mk
@@ -53,6 +53,7 @@
src/packages/UidMap.cpp \
src/storage/DropboxReader.cpp \
src/storage/DropboxWriter.cpp \
+ src/storage/StorageManager.cpp \
src/StatsLogProcessor.cpp \
src/StatsService.cpp \
src/stats_util.cpp \