projects/moments/app/src/main/java/io/v/moments/ux/ScanSwitchHolder.java
/**
     * Verify that scanning is off and that the UX reflects that fact.
     */
Verify that scanning is off and that the UX reflects that fact.
Verify that scanning is off and that the UX reflects that fact .
private void cleanUpPostStop() {
        Log.d(TAG, "cleanUpPostStop");
        if (mScanner.isScanning()) {
            throw new IllegalStateException("Scanning should be off.");
        }
        if (mToaster.isDestroyed()) {
            Log.d(TAG, "The activity is dead, no UX to fix.");
            return;
        }
        mRemoteMoments.dropAll();
        if (mSwitch.isChecked()) {
            mSwitch.setChecked(false);
        }
    }
private void cleanUpPostStop ( ) { Log . d ( TAG , "cleanUpPostStop" ) ; if ( mScanner . isScanning ( ) ) { throw new IllegalStateException ( "Scanning should be off." ) ; } if ( mToaster . isDestroyed ( ) ) { Log . d ( TAG , "The activity is dead, no UX to fix." ) ; return ; } mRemoteMoments . dropAll ( ) ; if ( mSwitch . isChecked ( ) ) { mSwitch . setChecked ( false ) ; } }
Verify that scanning is off and that the UX reflects that fact.
Verify that scanning is off and that the UX reflects that fact .
// The button might be checked if the scan expired. // The following call will trigger onCheckedChanged(false), but // shouldn't do more than change the UX because everything is // already shutdown.