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
(cherry picked from commit f59ca619ebd1d546b86a50503d02fc4b3a1e7868)
Change-Id: I837030862e24a86f65a004763e32d680de4d2feb
diff --git a/runtime/hidden_api.cc b/runtime/hidden_api.cc
index 9445ae0..9354d72 100644
--- a/runtime/hidden_api.cc
+++ b/runtime/hidden_api.cc
@@ -158,10 +158,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);