You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
MessageQueue: fix integer overflow when converting ms to us
This commit is contained in:
@@ -77,7 +77,7 @@ JNIEXPORT jboolean JNICALL Java_android_os_MessageQueue_nativePollOnce(JNIEnv *e
|
|||||||
if (message_queue->is_main_thread) { // thread loop is managed by glib
|
if (message_queue->is_main_thread) { // thread loop is managed by glib
|
||||||
if (timeout_millis) {
|
if (timeout_millis) {
|
||||||
if (timeout_millis != -1) // -1 means no more messages
|
if (timeout_millis != -1) // -1 means no more messages
|
||||||
g_source_set_ready_time(source, g_source_get_time(source) + timeout_millis*1000);
|
g_source_set_ready_time(source, g_source_get_time(source) + timeout_millis*1000L);
|
||||||
return true; // indicate that java side should return to block in glib managed loop
|
return true; // indicate that java side should return to block in glib managed loop
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user