diff options
author | James Hawkins <jhawkins@google.com> | 2017-09-19 12:03:47 -0700 |
---|---|---|
committer | James Hawkins <jhawkins@google.com> | 2017-09-19 12:03:47 -0700 |
commit | 2dcca295a610be5ba0ddaca90e6887649de2413d (patch) | |
tree | 45cb2b816fd0a19d34270a2fd0ade114b93996c2 /libmetricslogger | |
parent | f5dba11085eec3a9f5c3d2f97c8d41e2708eca96 (diff) | |
download | core-2dcca295a610be5ba0ddaca90e6887649de2413d.tar.gz core-2dcca295a610be5ba0ddaca90e6887649de2413d.tar.bz2 core-2dcca295a610be5ba0ddaca90e6887649de2413d.zip |
libmetricslogger: Fix one incorrect (deprecated) logtag and one
duplicate logtag.
Bug: 65841976
Bug: 65961260
Test: none
Change-Id: I6491c3c05e3a56b45d4a77cfa83f8e14eb226e64
Diffstat (limited to 'libmetricslogger')
-rw-r--r-- | libmetricslogger/Android.bp | 6 | ||||
-rw-r--r-- | libmetricslogger/metrics_logger.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/libmetricslogger/Android.bp b/libmetricslogger/Android.bp index 9b179d174..ad0c23853 100644 --- a/libmetricslogger/Android.bp +++ b/libmetricslogger/Android.bp @@ -19,12 +19,10 @@ cc_defaults { "-Wextra", "-Werror", - // The following defines map logtag IDs as represented by: + // The following define maps the sysui_multi_action logtag ID as represented by: // frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags // - // E.g., 524290 corresponds to sysui_count. - "-DCOUNT_LOG_TAG=524290", - "-DHISTOGRAM_LOG_TAG=524292", + // TODO(jhawkins): Query this value at runtime. "-DMULTI_ACTION_LOG_TAG=524292", ], } diff --git a/libmetricslogger/metrics_logger.cpp b/libmetricslogger/metrics_logger.cpp index a0dcf09cd..0ca024d73 100644 --- a/libmetricslogger/metrics_logger.cpp +++ b/libmetricslogger/metrics_logger.cpp @@ -25,14 +25,14 @@ namespace metricslogger { // Mirror com.android.internal.logging.MetricsLogger#histogram(). void LogHistogram(const std::string& event, int32_t data) { - android_log_event_list log(HISTOGRAM_LOG_TAG); + android_log_event_list log(MULTI_ACTION_LOG_TAG); log << LOGBUILDER_CATEGORY << LOGBUILDER_HISTOGRAM << LOGBUILDER_NAME << event << LOGBUILDER_BUCKET << data << LOGBUILDER_VALUE << 1 << LOG_ID_EVENTS; } // Mirror com.android.internal.logging.MetricsLogger#count(). void LogCounter(const std::string& name, int32_t val) { - android_log_event_list log(COUNT_LOG_TAG); + android_log_event_list log(MULTI_ACTION_LOG_TAG); log << LOGBUILDER_CATEGORY << LOGBUILDER_COUNTER << LOGBUILDER_NAME << name << LOGBUILDER_VALUE << val << LOG_ID_EVENTS; } |