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
make Looper, Handler, and MessageQueue work properly
this for example makes Unity apps not steal the main thread, hanging Gtk.
This commit is contained in:
@@ -34,7 +34,7 @@ public final class MessageQueue {
|
||||
private final boolean mQuitAllowed;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private int mPtr; // used by native code
|
||||
private long mPtr; // used by native code
|
||||
|
||||
Message mMessages;
|
||||
private final ArrayList<IdleHandler> mIdleHandlers = new ArrayList<IdleHandler>();
|
||||
@@ -48,11 +48,11 @@ public final class MessageQueue {
|
||||
// Barriers are indicated by messages with a null target whose arg1 field carries the token.
|
||||
private int mNextBarrierToken;
|
||||
|
||||
private native static int nativeInit();
|
||||
private native static void nativeDestroy(int ptr);
|
||||
private native static void nativePollOnce(int ptr, int timeoutMillis);
|
||||
private native static void nativeWake(int ptr);
|
||||
private native static boolean nativeIsIdling(int ptr);
|
||||
private native static long nativeInit();
|
||||
private native static void nativeDestroy(long ptr);
|
||||
private native static void nativePollOnce(long ptr, int timeoutMillis);
|
||||
private native static void nativeWake(long ptr);
|
||||
private native static boolean nativeIsIdling(long ptr);
|
||||
|
||||
/**
|
||||
* Callback interface for discovering when a thread is going to block
|
||||
|
||||
Reference in New Issue
Block a user