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 some Handler callback magic synchronous to avoid having to implement it properly
This commit is contained in:
@@ -595,7 +595,21 @@ public class Handler {
|
||||
return false;
|
||||
}
|
||||
return enqueueMessage(queue, msg, uptimeMillis);*/
|
||||
return true;
|
||||
if(mCallback != null) {
|
||||
// System.out.println("Handler.sendMessageAtTime: directly calling mCallback.handleMessage)");
|
||||
if(msg.callback != null) {
|
||||
msg.callback.run();
|
||||
}
|
||||
return mCallback.handleMessage(msg);
|
||||
} else {
|
||||
// System.out.println("Handler.sendMessageAtTime: not directly calling mCallback.handleMessage - mCallback is null)");
|
||||
/* do this in this case as well?
|
||||
if(msg.callback != null) {
|
||||
msg.callback.run();
|
||||
}
|
||||
*/
|
||||
return true; // false?
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user