Remove unneeded JNI method
Test: ran PFD CTS tests Change-Id: I9a40319595c757835f7e19a50dc0311077c9e627
This commit is contained in:
parent
4a76a3f32a
commit
d7bd919075
@ -2020,8 +2020,6 @@ public final class Parcel {
|
||||
@Deprecated
|
||||
static native void closeFileDescriptor(FileDescriptor desc) throws IOException;
|
||||
|
||||
static native void clearFileDescriptor(FileDescriptor desc);
|
||||
|
||||
/**
|
||||
* Read a byte value from the parcel at the current dataPosition().
|
||||
*/
|
||||
|
@ -683,7 +683,7 @@ public class ParcelFileDescriptor implements Parcelable, Closeable {
|
||||
throw new IllegalStateException("Already closed");
|
||||
}
|
||||
final int fd = getFd();
|
||||
Parcel.clearFileDescriptor(mFd);
|
||||
mFd.setInt$(-1);
|
||||
writeCommStatusAndClose(Status.DETACHED, null);
|
||||
mClosed = true;
|
||||
mGuard.close();
|
||||
|
@ -554,18 +554,6 @@ static void android_os_Parcel_closeFileDescriptor(JNIEnv* env, jclass clazz, job
|
||||
}
|
||||
}
|
||||
|
||||
static void android_os_Parcel_clearFileDescriptor(JNIEnv* env, jclass clazz, jobject object)
|
||||
{
|
||||
if (object == NULL) {
|
||||
jniThrowNullPointerException(env, NULL);
|
||||
return;
|
||||
}
|
||||
int fd = jniGetFDFromFileDescriptor(env, object);
|
||||
if (fd >= 0) {
|
||||
jniSetFileDescriptorOfFD(env, object, -1);
|
||||
}
|
||||
}
|
||||
|
||||
static jlong android_os_Parcel_create(JNIEnv* env, jclass clazz)
|
||||
{
|
||||
Parcel* parcel = new Parcel();
|
||||
@ -811,7 +799,6 @@ static const JNINativeMethod gParcelMethods[] = {
|
||||
{"openFileDescriptor", "(Ljava/lang/String;I)Ljava/io/FileDescriptor;", (void*)android_os_Parcel_openFileDescriptor},
|
||||
{"dupFileDescriptor", "(Ljava/io/FileDescriptor;)Ljava/io/FileDescriptor;", (void*)android_os_Parcel_dupFileDescriptor},
|
||||
{"closeFileDescriptor", "(Ljava/io/FileDescriptor;)V", (void*)android_os_Parcel_closeFileDescriptor},
|
||||
{"clearFileDescriptor", "(Ljava/io/FileDescriptor;)V", (void*)android_os_Parcel_clearFileDescriptor},
|
||||
|
||||
{"nativeCreate", "()J", (void*)android_os_Parcel_create},
|
||||
{"nativeFreeBuffer", "(J)J", (void*)android_os_Parcel_freeBuffer},
|
||||
|
Loading…
x
Reference in New Issue
Block a user