INNER CODE UNIT · Java

createIntent

termux/termux-x11 · lorie/src/main/java/com/termux/x11/CmdEntryPoint.java:57

    private Intent createIntent() {
        // We should not care about multiple instances, it should be called only by `Termux:X11` app
        // which is single instance...
        Bundle bundle = new Bundle();
        bundle.putBinder(null, this);

        Intent intent = new Intent(ACTION_START);
        intent.putExtra(null, bundle);
        intent.setPackage(BuildConfig.APPLICATION_ID);

        if (getuid() == 0 || getuid() == 2000)
            intent.setFlags(0x00400000 /* FLAG_RECEIVER_FROM_SHELL */);

        return intent;
    }

    private void sendBroadcast() {
        // Called from native (the X server thread) on every knock on the port; coalesce

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…