Do not log "None" type API accesses.
They do not imply any actual access, so logging them just pollutes the
logs.
Bug: 77517571
Test: m
Test: $ adb lolcat -b events | grep sysui_multi_action
Change-Id: I66100f25a8f0b3cf7b1a04e5fdd046a1368596a1
diff --git a/runtime/hidden_api.cc b/runtime/hidden_api.cc
index eeddce4..2480eba 100644
--- a/runtime/hidden_api.cc
+++ b/runtime/hidden_api.cc
@@ -154,10 +154,11 @@
}
void MemberSignature::LogAccessToEventLog(AccessMethod access_method, Action action_taken) {
- if (access_method == kLinking) {
+ if (access_method == kLinking || access_method == kNone) {
// Linking warnings come from static analysis/compilation of the bytecode
// and can contain false positives (i.e. code that is never run). We choose
// not to log these in the event log.
+ // None does not correspond to actual access, so should also be ignored.
return;
}
ComplexEventLogger log_maker(ACTION_HIDDEN_API_ACCESSED);