diff options
author | Orion Hodson <oth@google.com> | 2021-05-12 09:48:36 +0100 |
---|---|---|
committer | Orion Hodson <oth@google.com> | 2021-05-12 09:48:36 +0100 |
commit | d0a53db12d89df58ff4b39bb4b3493cd72094aee (patch) | |
tree | bd1ef0ee32d1f01b68c71a3ffa2f21da8bea0905 | |
parent | 9606a1efb1623eb40a4130960c2cdfa4bafdc96c (diff) | |
download | libnativehelper-d0a53db12d89df58ff4b39bb4b3493cd72094aee.tar.gz |
libnativehelper: retire AFileDescriptor_{get,set}FD
Superceded by AFileDescriptor_{get,set}Fd.
Bug: 185256332
Test: m
Change-Id: I7ccc81fda92aa48afabc14be09e042113e2e335b
-rw-r--r-- | file_descriptor_jni.c | 11 | ||||
-rw-r--r-- | include/android/file_descriptor_jni.h | 6 | ||||
-rw-r--r-- | libnativehelper.map.txt | 4 | ||||
-rw-r--r-- | libnativehelper_lazy.c | 14 |
4 files changed, 0 insertions, 35 deletions
diff --git a/file_descriptor_jni.c b/file_descriptor_jni.c index 4a8a053..bfae4af 100644 --- a/file_descriptor_jni.c +++ b/file_descriptor_jni.c @@ -41,18 +41,7 @@ JNIEXPORT int AFileDescriptor_getFd(JNIEnv* env, jobject fileDescriptor) { return (*env)->GetIntField(env, fileDescriptor, JniConstants_FileDescriptor_descriptor(env)); } -JNIEXPORT int AFileDescriptor_getFD(JNIEnv* env, jobject fileDescriptor) { - // Method deprecated pending removal (b/185256332). - return AFileDescriptor_getFd(env, fileDescriptor); -} - JNIEXPORT void AFileDescriptor_setFd(JNIEnv* env, jobject fileDescriptor, int fd) { EnsureArgumentIsFileDescriptor(env, fileDescriptor); (*env)->SetIntField(env, fileDescriptor, JniConstants_FileDescriptor_descriptor(env), fd); } - - -JNIEXPORT void AFileDescriptor_setFD(JNIEnv* env, jobject fileDescriptor, int fd) { - // Method deprecated pending removal (b/185256332). - AFileDescriptor_setFd(env, fileDescriptor, fd); -} diff --git a/include/android/file_descriptor_jni.h b/include/android/file_descriptor_jni.h index 4d4afa1..fbdfef5 100644 --- a/include/android/file_descriptor_jni.h +++ b/include/android/file_descriptor_jni.h @@ -62,9 +62,6 @@ jobject AFileDescriptor_create(JNIEnv* env) __INTRODUCED_IN(31); */ int AFileDescriptor_getFd(JNIEnv* env, jobject fileDescriptor) __INTRODUCED_IN(31); -// Deprecated equivalent of AFileDescriptor_getFd (b/185256332). -int AFileDescriptor_getFD(JNIEnv* env, jobject fileDescriptor) __INTRODUCED_IN(31); - /** * Sets the Unix file descriptor represented by the given java.io.FileDescriptor. * @@ -82,9 +79,6 @@ int AFileDescriptor_getFD(JNIEnv* env, jobject fileDescriptor) __INTRODUCED_IN(3 */ void AFileDescriptor_setFd(JNIEnv* env, jobject fileDescriptor, int fd) __INTRODUCED_IN(31); -// Deprecated equivalent of AFileDescriptor_setFd (b/185256332). -void AFileDescriptor_setFD(JNIEnv* env, jobject fileDescriptor, int fd) __INTRODUCED_IN(31); - __END_DECLS /** @} */ diff --git a/libnativehelper.map.txt b/libnativehelper.map.txt index 70e0ece..72efd92 100644 --- a/libnativehelper.map.txt +++ b/libnativehelper.map.txt @@ -4,10 +4,6 @@ LIBNATIVEHELPER_S { # introduced=S AFileDescriptor_create; AFileDescriptor_getFd; AFileDescriptor_setFd; - # AFileDescriptor_getFD is deprecated pending removal (b/185256332). - AFileDescriptor_getFD; - # AFileDescriptor_setFD is deprecated pending removal (b/185256332). - AFileDescriptor_setFD; # JNI Invocation methods available to platform and apps. JNI_CreateJavaVM; diff --git a/libnativehelper_lazy.c b/libnativehelper_lazy.c index 9f696c3..00851f7 100644 --- a/libnativehelper_lazy.c +++ b/libnativehelper_lazy.c @@ -41,8 +41,6 @@ enum MethodIndex { k_AFileDescriptor_create, k_AFileDescriptor_getFd, k_AFileDescriptor_setFd, - k_AFileDescriptor_getFD, // Deprecated pending removal (b/185256332). - k_AFileDescriptor_setFD, // Deprecated pending removal (b/185256332). // JNI_Invocation API declared in jni.h. k_JNI_CreateJavaVM, @@ -126,8 +124,6 @@ static void InitializeOnce() { BIND_SYMBOL(AFileDescriptor_create); BIND_SYMBOL(AFileDescriptor_getFd); BIND_SYMBOL(AFileDescriptor_setFd); - BIND_SYMBOL(AFileDescriptor_getFD); // Deprecated pending removal (b/185256332). - BIND_SYMBOL(AFileDescriptor_setFD); // Deprecated pending removal (b/185256332). // JNI_Invocation API declared in jni.h. BIND_SYMBOL(JNI_CreateJavaVM); @@ -208,16 +204,6 @@ void AFileDescriptor_setFd(JNIEnv* env, jobject fileDescriptor, int fd) { INVOKE_VOID_METHOD(AFileDescriptor_setFd, M, env, fileDescriptor, fd); } -int AFileDescriptor_getFD(JNIEnv* env, jobject fileDescriptor) { - typedef int (*M)(JNIEnv*, jobject); - INVOKE_METHOD(AFileDescriptor_getFD, M, env, fileDescriptor); -} - -void AFileDescriptor_setFD(JNIEnv* env, jobject fileDescriptor, int fd) { - typedef void (*M)(JNIEnv*, jobject, int); - INVOKE_VOID_METHOD(AFileDescriptor_setFD, M, env, fileDescriptor, fd); -} - // // Forwarding for the JNI_Invocation API declarded in jni.h. // |