Code example for ProgressDialog

Methods: hide

0
                            || BluetoothAdapter.STATE_TURNING_ON == previousState)) {
                mNumEnabledTimes++;
            } 
 
            if (BluetoothAdapter.STATE_OFF == newState) {
                mDisablingDialog.hide();
                mToggleButton.setEnabled(true);
            } 
 
            mToggleButton.setChecked(mBluetoothAdapter.isEnabled());
            getPassButton().setEnabled(mNumDisabledTimes > 0 &&  mNumEnabledTimes > 0);
        } 
    } 
 
    @Override 
    protected void onDestroy() { 
        super.onDestroy(); 
        unregisterReceiver(mReceiver);
    } 
}