INNER CODE UNIT · Java
sendBroadcast
termux/termux-x11 · lorie/src/main/java/com/termux/x11/CmdEntryPoint.java:73
private void sendBroadcast() {
// Called from native (the X server thread) on every knock on the port; coalesce
// bursts into a single broadcast fired 250ms later.
synchronized (this) {
if (broadcastPending)
return;
broadcastPending = true;
}
handler.postDelayed(() -> {
synchronized (this) { broadcastPending = false; }
sendBroadcast(intent);
}, 250);
}
static void sendBroadcast(Intent intent) {
try {
ctx.sendBroadcast(intent);
} catch (Exception e) {