@ SuppressWarnings ( "unused" ) @ RequiresApi ( 21 ) public void enablePowerCycleOnFailures ( Context context ) { initializeWithContext ( context ) ; if ( this . mLocalBroadcastManager != null ) { this . mLocalBroadcastManager . registerReceiver ( this . mBluetoothEventReceiver , new IntentFilter ( "onScanFailed" ) ) ; this . mLocalBroadcastManager . registerReceiver ( this . mBluetoothEventReceiver , new IntentFilter ( "onStartFailure" ) ) ; LogManager . d ( TAG , "Medic monitoring for transmission and scan failure notifications with receiver: " + this . mBluetoothEventReceiver ) ; } }
If set to true bluetooth will be power cycled on any tests run that determine bluetooth is in a bad state .