summaryrefslogtreecommitdiff
path: root/runtime/runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r--runtime/runtime.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 022a1be124..184e4e5b91 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -520,14 +520,30 @@ class Runtime {
bool IsVerificationEnabled() const;
bool IsVerificationSoftFail() const;
- void DisableHiddenApiChecks() {
- do_hidden_api_checks_ = false;
+ void SetHiddenApiChecksEnabled(bool value) {
+ do_hidden_api_checks_ = value;
}
bool AreHiddenApiChecksEnabled() const {
return do_hidden_api_checks_;
}
+ void SetPendingHiddenApiWarning(bool value) {
+ pending_hidden_api_warning_ = value;
+ }
+
+ bool HasPendingHiddenApiWarning() const {
+ return pending_hidden_api_warning_;
+ }
+
+ void SetDedupeHiddenApiWarnings(bool value) {
+ dedupe_hidden_api_warnings_ = value;
+ }
+
+ bool ShouldDedupeHiddenApiWarnings() {
+ return dedupe_hidden_api_warnings_;
+ }
+
bool IsDexFileFallbackEnabled() const {
return allow_dex_file_fallback_;
}
@@ -968,6 +984,14 @@ class Runtime {
// Whether access checks on hidden API should be performed.
bool do_hidden_api_checks_;
+ // Whether the application has used an API which is not restricted but we
+ // should issue a warning about it.
+ bool pending_hidden_api_warning_;
+
+ // Do not warn about the same hidden API access violation twice.
+ // This is only used for testing.
+ bool dedupe_hidden_api_warnings_;
+
// Whether threads should dump their native stack on SIGQUIT.
bool dump_native_stack_on_sig_quit_;