Adding ability to add configs via adb command-line. The input
must be in serialized binary format. Also fixes small issue
in build rule related to proto lib.

Test: Manually tested that ADB command works without crashing.

Change-Id: Iba2e677561ff500adb601a598f73e8a7b32540e5
diff --git a/cmds/statsd/src/StatsLogProcessor.h b/cmds/statsd/src/StatsLogProcessor.h
index 23066ab9..d2daecd 100644
--- a/cmds/statsd/src/StatsLogProcessor.h
+++ b/cmds/statsd/src/StatsLogProcessor.h
@@ -19,8 +19,12 @@
 #include "LogReader.h"
 #include "DropboxWriter.h"
 
+#include <frameworks/base/cmds/statsd/src/statsd_config.pb.h>
 #include <log/logprint.h>
 #include <stdio.h>
+#include <unordered_map>
+
+using android::os::statsd::StatsdConfig;
 
 class StatsLogProcessor : public LogListener
 {
@@ -30,6 +34,8 @@
 
     virtual void OnLogEvent(const log_msg& msg);
 
+    virtual void UpdateConfig(const int config_source, StatsdConfig config);
+
 private:
     /**
      * Numeric to string tag name mapping.
@@ -42,5 +48,11 @@
     AndroidLogFormat* m_format;
 
     DropboxWriter m_dropbox_writer;
+
+    /**
+     * Configs that have been specified, keyed by the source. This allows us to over-ride the config
+     * from a source later.
+     */
+    std::unordered_map<int, StatsdConfig> m_configs;
 };
 #endif //STATS_LOG_PROCESSOR_H