summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Guang Zhu <guangzhu@google.com> 2018-02-08 17:44:40 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-02-08 17:44:40 +0000
commit272bbb09599d7744fbf846cf7c13c40d6de0e484 (patch)
tree0a474574407fc00d340b081793634419def5625f
parentdf30f82c86cd8a2575b09892d5d351be014df756 (diff)
parent7b6345dac7148c6223a1c41b136636a2369bca47 (diff)
Merge "Revert "Disable hidden API checks during WellKnownClasses::Init""
-rw-r--r--runtime/well_known_classes.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/runtime/well_known_classes.cc b/runtime/well_known_classes.cc
index f4f5420190..5fe10f5c12 100644
--- a/runtime/well_known_classes.cc
+++ b/runtime/well_known_classes.cc
@@ -278,12 +278,6 @@ uint32_t WellKnownClasses::StringInitToEntryPoint(ArtMethod* string_init) {
#undef STRING_INIT_LIST
void WellKnownClasses::Init(JNIEnv* env) {
- // The following initializers use JNI to get handles on hidden methods/fields.
- // Temporarily disable hidden API checks as they would see these calls coming
- // from an unattached thread and assume the caller is not in boot class path.
- const bool hidden_api_checks_enabled = Runtime::Current()->AreHiddenApiChecksEnabled();
- Runtime::Current()->SetHiddenApiChecksEnabled(false);
-
dalvik_annotation_optimization_CriticalNative =
CacheClass(env, "dalvik/annotation/optimization/CriticalNative");
dalvik_annotation_optimization_FastNative = CacheClass(env, "dalvik/annotation/optimization/FastNative");
@@ -407,9 +401,6 @@ void WellKnownClasses::Init(JNIEnv* env) {
InitStringInit(env);
Thread::Current()->InitStringEntryPoints();
-
- // Reenable hidden API checks if necessary.
- Runtime::Current()->SetHiddenApiChecksEnabled(hidden_api_checks_enabled);
}
void WellKnownClasses::LateInit(JNIEnv* env) {