Code example for Intent

Methods: getActiongetIntExtra

        new TestsListPreloaderThread(path, doneMsg).start();
    protected void onNewIntent(Intent intent) {
        if (intent.getAction().equals(Intent.ACTION_REBOOT)) {
        } else if (intent.getAction().equals(Intent.ACTION_SHUTDOWN)) {
     * This method handles an intent that comes from ManageService when crash is detected. 
     * The intent contains an index in mTestsList of the test that crashed. TestsListActivity 
     * restarts the LayoutTestsExecutor from the following test in mTestsList, by sending 
     * an intent to it. This new intent contains a list of remaining tests to run, 
     * total count of all tests, and the index of the first test to run after restarting. 
     * LayoutTestExecutor runs then as usual, sending reports to ManagerService. If it 
     * detects the crash it sends a new intent and the flow repeats. 
    private void onCrashIntent(Intent intent) {
        int nextTestToRun = intent.getIntExtra("crashedTestIndex", -1) + 1;
        if (nextTestToRun > 0 && nextTestToRun <= mTotalTestCount) {