Add stubs for renamed libnativehelper NDK API methods

The renames will be:
- AFileDescriptor_getFD to AFileDescriptor_getFd
- AFileDescriptor_setFD to AFileDescriptor_setFd

This CL adds the new symbols, the old symbols will be retired in a
follow-up.

Bug: 185256332
Test: TH

(cherry picked from commit 3ae128569ed1683e570da350be75d08aa0d7a907)
Merged-In: Ifc0cf49bd699e4ab19f32ffd3c5594601979c8ea
Change-Id: Ie5c1bd35bc4fee90eb769de72c307f636564a180
diff --git a/libnativehelper/stubs_arm.cc b/libnativehelper/stubs_arm.cc
index 4a9c073..1281ff3 100644
--- a/libnativehelper/stubs_arm.cc
+++ b/libnativehelper/stubs_arm.cc
@@ -19,7 +19,9 @@
 
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_create);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFd);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFd);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlCloseLibrary);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetError);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetSymbol);
@@ -70,7 +72,9 @@
 static void __attribute__((constructor(0))) init_stub_library() {
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_create);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFD);
+  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFd);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFD);
+  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFd);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlCloseLibrary);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetError);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetSymbol);
diff --git a/libnativehelper/stubs_arm64.cc b/libnativehelper/stubs_arm64.cc
index 4a9c073..1281ff3 100644
--- a/libnativehelper/stubs_arm64.cc
+++ b/libnativehelper/stubs_arm64.cc
@@ -19,7 +19,9 @@
 
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_create);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFd);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFd);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlCloseLibrary);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetError);
 DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetSymbol);
@@ -70,7 +72,9 @@
 static void __attribute__((constructor(0))) init_stub_library() {
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_create);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFD);
+  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFd);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFD);
+  INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFd);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlCloseLibrary);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetError);
   INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetSymbol);