FtcXtensible/src/main/java/org/ftccommunity/ftcxtensible/robot/ExtensibleOpMode.java
@Override
    public final void init() {
        if (gamepad1 == null)
            gamepad1 = new Gamepad();
        if (gamepad2 == null)
            gamepad2 = new Gamepad();

        prepare(hardwareMap.appContext, hardwareMap, gamepad1, gamepad2, telemetry);

        // Upgrade thread priority
        Thread.currentThread().setPriority(7);

        // Build an exception handler
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Activity controller = (Activity) appContext();
                @SuppressWarnings("ResourceType") PendingIntent intent = PendingIntent.getActivity(controller.getBaseContext(), 0,
                        new Intent(controller.getIntent()), controller.getIntent().getFlags());
                Thread.currentThread().setUncaughtExceptionHandler(new RobotUncaughtExceptionHandler(appContext(), intent, 250));
            }
        });

        LinkedList<Object> list = new LinkedList<>();
        try {
            init(this, list);
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
            return;
        } catch (Exception e) {
            handleException(list, e);
        }

        postProcess(list, RobotStatus.MainStates.START);
    }
/**
     * Initialize the Extensible OpMode and perform the user code operations to initialize the
     * robot
     */
Initialize the Extensible OpMode and perform the user code operations to initialize the
robot
Initialize the Extensible OpMode and perform the user code operations to initialize the robot
@Override
    public final void init() {
        if (gamepad1 == null)
            gamepad1 = new Gamepad();
        if (gamepad2 == null)
            gamepad2 = new Gamepad();
        prepare(hardwareMap.appContext, hardwareMap, gamepad1, gamepad2, telemetry);
        Thread.currentThread().setPriority(7);
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Activity controller = (Activity) appContext();
                @SuppressWarnings("ResourceType") PendingIntent intent = PendingIntent.getActivity(controller.getBaseContext(), 0,
                        new Intent(controller.getIntent()), controller.getIntent().getFlags());
                Thread.currentThread().setUncaughtExceptionHandler(new RobotUncaughtExceptionHandler(appContext(), intent, 250));
            }
        });
        LinkedList<Object> list = new LinkedList<>();
        try {
            init(this, list);
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
            return;
        } catch (Exception e) {
            handleException(list, e);
        }
        postProcess(list, RobotStatus.MainStates.START);
    }
@ Override public final void init ( ) { if ( gamepad1 == null ) gamepad1 = new Gamepad ( ) ; if ( gamepad2 == null ) gamepad2 = new Gamepad ( ) ; prepare ( hardwareMap . appContext , hardwareMap , gamepad1 , gamepad2 , telemetry ) ; Thread . currentThread ( ) . setPriority ( 7 ) ; runOnUiThread ( new Runnable ( ) { @ Override public void run ( ) { Activity controller = ( Activity ) appContext ( ) ; @ SuppressWarnings ( "ResourceType" ) PendingIntent intent = PendingIntent . getActivity ( controller . getBaseContext ( ) , 0 , new Intent ( controller . getIntent ( ) ) , controller . getIntent ( ) . getFlags ( ) ) ; Thread . currentThread ( ) . setUncaughtExceptionHandler ( new RobotUncaughtExceptionHandler ( appContext ( ) , intent , 250 ) ) ; } } ) ; LinkedList < Object > list = new LinkedList < > ( ) ; try { init ( this , list ) ; } catch ( InterruptedException ex ) { Thread . currentThread ( ) . interrupt ( ) ; return ; } catch ( Exception e ) { handleException ( list , e ) ; } postProcess ( list , RobotStatus . MainStates . START ) ; }
Initialize the Extensible OpMode and perform the user code operations to initialize the
 robot
Initialize the Extensible OpMode and perform the user code operations to initialize the robot
// Upgrade thread priority // Build an exception handler