Revert "logd: liblog: whitelist "snet_event_log""
Callers will not guarantee that they can or will ratelimit, we need to
retain the ability to blacklist snet_event_log as a result.
This reverts commit 040ce2b5ba960f8f3e1c20ef8343bc432e2a9164.
Bug: 26178938
Change-Id: Ibf47d2e23a84c56f5f72d02312c698df7ff2b601
diff --git a/logd/LogBuffer.cpp b/logd/LogBuffer.cpp
index 1b829c6..ec32393 100644
--- a/logd/LogBuffer.cpp
+++ b/logd/LogBuffer.cpp
@@ -205,20 +205,16 @@
LogBufferElement *elem = new LogBufferElement(log_id, realtime,
uid, pid, tid, msg, len);
- if (log_id != LOG_ID_SECURITY) { // whitelist LOG_ID_SECURITY
+ if (log_id != LOG_ID_SECURITY) {
int prio = ANDROID_LOG_INFO;
- const char *tag = (const char *)-1;
+ const char *tag = NULL;
if (log_id == LOG_ID_EVENTS) {
- // whitelist "snet_event_log"
- if (elem->getTag() != SNET_EVENT_LOG_TAG) {
- tag = android::tagToName(elem->getTag());
- }
+ tag = android::tagToName(elem->getTag());
} else {
prio = *msg;
tag = msg + 1;
}
- if ((tag != (const char *)-1) &&
- !__android_log_is_loggable(prio, tag, ANDROID_LOG_VERBOSE)) {
+ if (!__android_log_is_loggable(prio, tag, ANDROID_LOG_VERBOSE)) {
// Log traffic received to total
pthread_mutex_lock(&mLogElementsLock);
stats.add(elem);