Snap for 7384269 from 5ab419c99cbc92d330630d5ea3efd0be283b37c1 to sc-release

Change-Id: I6aa240ffc0819ffc97234b3c3b531d4d76b7fa0a
diff --git a/libnativehelper/stubs_arm.cc b/libnativehelper/stubs_arm.cc
index b6cd163..e0d9d15 100644
--- a/libnativehelper/stubs_arm.cc
+++ b/libnativehelper/stubs_arm.cc
@@ -50,16 +50,14 @@
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(JniInvocationGetLibrary);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(JniInvocationGetLibraryWith);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(JniInvocationInit);
-DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniCreateFileDescriptor);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniCreateString);
-DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetFDFromFileDescriptor);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferBaseArray);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferBaseArrayOffset);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferFields);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferPointer);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniLogException);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniRegisterNativeMethods);
-DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniSetFileDescriptorOfFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowErrnoException);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowException);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowExceptionFmt);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowIOException);
@@ -101,16 +99,14 @@
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", JniInvocationGetLibrary);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", JniInvocationGetLibraryWith);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", JniInvocationInit);
-  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniCreateFileDescriptor);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniCreateString);
-  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetFDFromFileDescriptor);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferBaseArray);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferBaseArrayOffset);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferFields);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferPointer);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniLogException);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniRegisterNativeMethods);
-  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniSetFileDescriptorOfFD);
+  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowErrnoException);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowException);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowExceptionFmt);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowIOException);
diff --git a/libnativehelper/stubs_arm64.cc b/libnativehelper/stubs_arm64.cc
index b6cd163..e0d9d15 100644
--- a/libnativehelper/stubs_arm64.cc
+++ b/libnativehelper/stubs_arm64.cc
@@ -50,16 +50,14 @@
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(JniInvocationGetLibrary);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(JniInvocationGetLibraryWith);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(JniInvocationInit);
-DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniCreateFileDescriptor);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniCreateString);
-DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetFDFromFileDescriptor);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferBaseArray);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferBaseArrayOffset);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferFields);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniGetNioBufferPointer);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniLogException);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniRegisterNativeMethods);
-DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniSetFileDescriptorOfFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowErrnoException);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowException);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowExceptionFmt);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniThrowIOException);
@@ -101,16 +99,14 @@
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", JniInvocationGetLibrary);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", JniInvocationGetLibraryWith);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", JniInvocationInit);
-  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniCreateFileDescriptor);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniCreateString);
-  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetFDFromFileDescriptor);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferBaseArray);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferBaseArrayOffset);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferFields);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniGetNioBufferPointer);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniLogException);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniRegisterNativeMethods);
-  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniSetFileDescriptorOfFD);
+  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowErrnoException);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowException);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowExceptionFmt);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", jniThrowIOException);