Revert "art: Add FileDescriptor fields to native Core Platform API"
Reason for revert: Fails 'atest PreloadCheck'
Reverted Changes:
Ifd25daed9:art: Add FileDescriptor fields to native Core Plat...
I7c65da755:libcore: Remove native calls in FileDescriptor <cl...
Change-Id: Ie9fa5a25d5352f214a16e10d5bbbe45da9f3c486
Exempt-From-Owner-Approval: revert
Bug: 150680645
Bug: 151107960
diff --git a/runtime/hidden_api.cc b/runtime/hidden_api.cc
index f33600f..c55a134 100644
--- a/runtime/hidden_api.cc
+++ b/runtime/hidden_api.cc
@@ -122,8 +122,6 @@
// The following fields in WellKnownClasses correspond to private fields in the Core Platform
// API that cannot be otherwise expressed and propagated through tooling (b/144502743).
jfieldID private_core_platform_api_fields[] = {
- WellKnownClasses::java_io_FileDescriptor_descriptor,
- WellKnownClasses::java_io_FileDescriptor_ownerId,
WellKnownClasses::java_nio_Buffer_address,
WellKnownClasses::java_nio_Buffer_elementSizeShift,
WellKnownClasses::java_nio_Buffer_limit,
diff --git a/runtime/well_known_classes.cc b/runtime/well_known_classes.cc
index fabd4db..017dd0e 100644
--- a/runtime/well_known_classes.cc
+++ b/runtime/well_known_classes.cc
@@ -130,8 +130,6 @@
jfieldID WellKnownClasses::dalvik_system_DexPathList_dexElements;
jfieldID WellKnownClasses::dalvik_system_DexPathList__Element_dexFile;
jfieldID WellKnownClasses::dalvik_system_VMRuntime_nonSdkApiUsageConsumer;
-jfieldID WellKnownClasses::java_io_FileDescriptor_descriptor;
-jfieldID WellKnownClasses::java_io_FileDescriptor_ownerId;
jfieldID WellKnownClasses::java_lang_Thread_parkBlocker;
jfieldID WellKnownClasses::java_lang_Thread_daemon;
jfieldID WellKnownClasses::java_lang_Thread_group;
@@ -420,10 +418,6 @@
dalvik_system_DexPathList__Element_dexFile = CacheField(env, dalvik_system_DexPathList__Element, false, "dexFile", "Ldalvik/system/DexFile;");
dalvik_system_VMRuntime_nonSdkApiUsageConsumer = CacheField(env, dalvik_system_VMRuntime, true, "nonSdkApiUsageConsumer", "Ljava/util/function/Consumer;");
- ScopedLocalRef<jclass> java_io_FileDescriptor(env, env->FindClass("java/io/FileDescriptor"));
- java_io_FileDescriptor_descriptor = CacheField(env, java_io_FileDescriptor.get(), false, "descriptor", "I");
- java_io_FileDescriptor_ownerId = CacheField(env, java_io_FileDescriptor.get(), false, "ownerId", "J");
-
java_lang_Thread_parkBlocker = CacheField(env, java_lang_Thread, false, "parkBlocker", "Ljava/lang/Object;");
java_lang_Thread_daemon = CacheField(env, java_lang_Thread, false, "daemon", "Z");
java_lang_Thread_group = CacheField(env, java_lang_Thread, false, "group", "Ljava/lang/ThreadGroup;");
@@ -549,8 +543,6 @@
dalvik_system_BaseDexClassLoader_getLdLibraryPath = nullptr;
dalvik_system_VMRuntime_runFinalization = nullptr;
dalvik_system_VMRuntime_hiddenApiUsed = nullptr;
- java_io_FileDescriptor_descriptor = nullptr;
- java_io_FileDescriptor_ownerId = nullptr;
java_lang_Boolean_valueOf = nullptr;
java_lang_Byte_valueOf = nullptr;
java_lang_Character_valueOf = nullptr;
diff --git a/runtime/well_known_classes.h b/runtime/well_known_classes.h
index 6f67fde6..4a35210 100644
--- a/runtime/well_known_classes.h
+++ b/runtime/well_known_classes.h
@@ -143,8 +143,6 @@
static jfieldID dalvik_system_DexPathList_dexElements;
static jfieldID dalvik_system_DexPathList__Element_dexFile;
static jfieldID dalvik_system_VMRuntime_nonSdkApiUsageConsumer;
- static jfieldID java_io_FileDescriptor_descriptor;
- static jfieldID java_io_FileDescriptor_ownerId;
static jfieldID java_lang_Thread_parkBlocker;
static jfieldID java_lang_Thread_daemon;
static jfieldID java_lang_Thread_group;