exit thread when BT turned off

(The test was in the thread this replaced.)
This commit is contained in:
Eric House 2019-02-21 10:45:50 -08:00
parent 23739f57b9
commit 9baffc93e3

View file

@ -1011,7 +1011,7 @@ public class BTService extends XWJIService {
// appropriate based on backoff logic, and be awakened when // appropriate based on backoff logic, and be awakened when
// something new comes in or there's reason to hope a send try // something new comes in or there's reason to hope a send try
// will succeed. // will succeed.
while ( ! mShouldExit ) { while ( BTEnabled() && ! mShouldExit ) {
synchronized ( this ) { synchronized ( this ) {
if ( mExitWhenEmpty && 0 == mElems.size() ) { if ( mExitWhenEmpty && 0 == mElems.size() ) {
break; break;