summaryrefslogtreecommitdiff
path: root/runtime/hidden_api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/hidden_api.cc')
-rw-r--r--runtime/hidden_api.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/hidden_api.cc b/runtime/hidden_api.cc
index 02b4f5349d..98feb4d8ed 100644
--- a/runtime/hidden_api.cc
+++ b/runtime/hidden_api.cc
@@ -137,8 +137,10 @@ Action GetMemberActionImpl(T* member, Action action, AccessMethod access_method)
// Avoid re-examining the exemption list next time.
// Note this results in no warning for the member, which seems like what one would expect.
// Exemptions effectively adds new members to the whitelist.
- member->SetAccessFlags(HiddenApiAccessFlags::EncodeForRuntime(
- member->GetAccessFlags(), HiddenApiAccessFlags::kWhitelist));
+ if (runtime->ShouldDedupeHiddenApiWarnings()) {
+ member->SetAccessFlags(HiddenApiAccessFlags::EncodeForRuntime(
+ member->GetAccessFlags(), HiddenApiAccessFlags::kWhitelist));
+ }
return kAllow;
}