From 4878afb1855fc8620f10202561471096e7919f69 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 18 Jan 2019 06:51:23 -0800 Subject: [PATCH] remove misplaced assert --- .../src/main/java/org/eehouse/android/xw4/BTService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java index bf4676803..8f0579c1b 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java @@ -664,16 +664,14 @@ public class BTService extends XWService { void setService( Context context, BTService service ) { synchronized ( mServiceHolder ) { - if ( null == mServiceHolder[0] ) { - Log.d( TAG, "setService(): setting. notifying all!!!" ); + if ( service != mServiceHolder[0] ) { Assert.assertNotNull( context ); mContext = context; // Use Service instead of Receiver (possibly) mServiceHolder[0] = service; if ( service != null ) { + Log.d( TAG, "setService(): setting. notifying all!!!" ); mServiceHolder.notifyAll(); } - } else { - Assert.assertTrue( service == mServiceHolder[0] ); } } }