Loading core/jni/android_database_SQLiteConnection.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -210,7 +210,8 @@ static void sqliteCustomFunctionCallback(sqlite3_context *context, // Get the callback function object. // Create a new local reference to it in case the callback tries to do something // dumb like unregister the function (thereby destroying the global ref) while it is running. // unexpected like unregister the function (thereby destroying the global ref) // while it is running. jobject functionObjGlobal = reinterpret_cast<jobject>(sqlite3_user_data(context)); jobject functionObj = env->NewLocalRef(functionObjGlobal); Loading core/jni/android_media_AudioSystem.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -936,7 +936,7 @@ static jint convertAudioPortConfigFromNative(JNIEnv *env, if (jHandle == NULL) { return (jint)AUDIO_JAVA_ERROR; } // create dummy port and port config objects with just the correct handle // create placeholder port and port config objects with just the correct handle // and configuration data. The actual AudioPortConfig objects will be // constructed by java code with correct class type (device, mix etc...) // and reference to AudioPort instance in this client Loading core/jni/android_net_NetUtils.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -93,9 +93,10 @@ static void android_net_utils_attachDropAllBPFFilter(JNIEnv *env, jobject clazz, static void android_net_utils_detachBPFFilter(JNIEnv *env, jobject clazz, jobject javaFd) { int dummy = 0; int optval_ignored = 0; int fd = jniGetFDFromFileDescriptor(env, javaFd); if (setsockopt(fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy)) != 0) { if (setsockopt( fd, SOL_SOCKET, SO_DETACH_FILTER, &optval_ignored, sizeof(optval_ignored)) != 0) { jniThrowExceptionFmt(env, "java/net/SocketException", "setsockopt(SO_DETACH_FILTER): %s", strerror(errno)); } Loading core/jni/android_os_Debug.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -913,7 +913,7 @@ int register_android_os_Debug(JNIEnv *env) { jclass clazz = env->FindClass("android/os/Debug$MemoryInfo"); // Sanity check the number of other statistics expected in Java matches here. // Check the number of other statistics expected in Java matches here. jfieldID numOtherStats_field = env->GetStaticFieldID(clazz, "NUM_OTHER_STATS", "I"); jint numOtherStats = env->GetStaticIntField(clazz, numOtherStats_field); jfieldID numDvkStats_field = env->GetStaticFieldID(clazz, "NUM_DVK_STATS", "I"); Loading core/jni/android_os_Parcel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,7 @@ static jbyteArray android_os_Parcel_createByteArray(JNIEnv* env, jclass clazz, j if (parcel != NULL) { int32_t len = parcel->readInt32(); // sanity check the stored length against the true data size // Validate the stored length against the true data size if (len >= 0 && len <= (int32_t)parcel->dataAvail()) { ret = env->NewByteArray(len); Loading Loading
core/jni/android_database_SQLiteConnection.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -210,7 +210,8 @@ static void sqliteCustomFunctionCallback(sqlite3_context *context, // Get the callback function object. // Create a new local reference to it in case the callback tries to do something // dumb like unregister the function (thereby destroying the global ref) while it is running. // unexpected like unregister the function (thereby destroying the global ref) // while it is running. jobject functionObjGlobal = reinterpret_cast<jobject>(sqlite3_user_data(context)); jobject functionObj = env->NewLocalRef(functionObjGlobal); Loading
core/jni/android_media_AudioSystem.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -936,7 +936,7 @@ static jint convertAudioPortConfigFromNative(JNIEnv *env, if (jHandle == NULL) { return (jint)AUDIO_JAVA_ERROR; } // create dummy port and port config objects with just the correct handle // create placeholder port and port config objects with just the correct handle // and configuration data. The actual AudioPortConfig objects will be // constructed by java code with correct class type (device, mix etc...) // and reference to AudioPort instance in this client Loading
core/jni/android_net_NetUtils.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -93,9 +93,10 @@ static void android_net_utils_attachDropAllBPFFilter(JNIEnv *env, jobject clazz, static void android_net_utils_detachBPFFilter(JNIEnv *env, jobject clazz, jobject javaFd) { int dummy = 0; int optval_ignored = 0; int fd = jniGetFDFromFileDescriptor(env, javaFd); if (setsockopt(fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy)) != 0) { if (setsockopt( fd, SOL_SOCKET, SO_DETACH_FILTER, &optval_ignored, sizeof(optval_ignored)) != 0) { jniThrowExceptionFmt(env, "java/net/SocketException", "setsockopt(SO_DETACH_FILTER): %s", strerror(errno)); } Loading
core/jni/android_os_Debug.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -913,7 +913,7 @@ int register_android_os_Debug(JNIEnv *env) { jclass clazz = env->FindClass("android/os/Debug$MemoryInfo"); // Sanity check the number of other statistics expected in Java matches here. // Check the number of other statistics expected in Java matches here. jfieldID numOtherStats_field = env->GetStaticFieldID(clazz, "NUM_OTHER_STATS", "I"); jint numOtherStats = env->GetStaticIntField(clazz, numOtherStats_field); jfieldID numDvkStats_field = env->GetStaticFieldID(clazz, "NUM_DVK_STATS", "I"); Loading
core/jni/android_os_Parcel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -328,7 +328,7 @@ static jbyteArray android_os_Parcel_createByteArray(JNIEnv* env, jclass clazz, j if (parcel != NULL) { int32_t len = parcel->readInt32(); // sanity check the stored length against the true data size // Validate the stored length against the true data size if (len >= 0 && len <= (int32_t)parcel->dataAvail()) { ret = env->NewByteArray(len); Loading