in android/tooling/utils/intellij-broadcast-core/src/main/java/com/uber/debug/broadcast/core/DebugBroadcastReceiver.java [50:71]
public void onReceive(Context context, Intent intent) {
// Only application is the foreground should respond to intent
if (!isAppInForeground(context)) {
return;
}
DebugBroadcastRequest request = DebugBroadcastRequest.from(intent);
if (!request.isValid()) {
request.error("Invalid request");
return;
}
for (Handler handler : handlers) {
if (handler.canHandle(request)) {
try {
handler.handle(request);
} catch (Exception e) {
request.error("Command error: " + e.toString());
}
return;
}
}
request.error("Unsupported command");
}