INNER CODE UNIT · Java

onBroadcastReceive

termux/termux-x11 · lorie/src/main/java/com/termux/x11/LorieApp.java:125

    public void onBroadcastReceive(Intent intent) {
        MainActivity activity = MainActivity.getInstance();
        String action = intent.getAction();
        if (activity != null)
            activity.prefs = getPrefs(activity);

        switch (action == null ? "" : action) {
            case ACTION_START: {
                Bundle bundle = intent.getBundleExtra(null);
                IBinder binder = bundle == null ? null : bundle.getBinder(null);
                if (binder == null)
                    break;

                IBinder activeService = activity != null && activity.service != null ? activity.service.asBinder() : null;
                boolean sameConnection = binder.equals(activeService) || binder.equals(pendingConnection);
                if (!sameConnection && ((activeService != null && activeService.isBinderAlive()) || (pendingConnection != null && pendingConnection.isBinderAlive()))) {
                    try {
                        ICmdEntryInterface.Stub.asInterface(binder).reportFatalError("Termux:X11 already has an active X server connection.");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…