@ Override public void stop ( ) { super . stop ( ) ; try { getContext ( ) . unregisterReceiver ( mBroadcastReceiver ) ; } catch ( IllegalArgumentException e ) { Log . d ( TAG , "Unable to unregister receiver when stopping, probably not registered" ) ; } }
Unregister USB device intent broadcast receivers and stop waiting for a connection .