From ef602baa18001ab14f86d351eeb9698981da2b5d Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 8 Feb 2019 13:39:27 -0800 Subject: [PATCH] cleanup --- .../src/main/java/org/eehouse/android/xw4/BTService.java | 8 ++++---- .../main/java/org/eehouse/android/xw4/XWJIService.java | 3 +-- 2 files changed, 5 insertions(+), 6 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 74e6e3aea..98f3f6d10 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 @@ -339,10 +339,10 @@ public class BTService extends XWJIService { Assert.assertNotNull( targetAddr ); String btAddr = getSafeAddr( targetAddr ); if ( null != btAddr && 0 < btAddr.length() ) { - Intent intent = getIntentTo( context, BTAction.SEND ); - intent.putExtra( MSG_KEY, buf ); - intent.putExtra( ADDR_KEY, btAddr ); - intent.putExtra( GAMEID_KEY, gameID ); + Intent intent = getIntentTo( context, BTAction.SEND ) + .putExtra( MSG_KEY, buf ) + .putExtra( ADDR_KEY, btAddr ) + .putExtra( GAMEID_KEY, gameID ); enqueueWork( context, intent ); nSent = buf.length; } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWJIService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWJIService.java index 152ad8fce..4ddb5be9f 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWJIService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWJIService.java @@ -57,8 +57,7 @@ abstract class XWJIService extends JobIntentService { XWJICmds cmdFrom( Intent intent ) { - int ord = intent.getIntExtra( CMD_KEY, -1 ); - return getCmds()[ord]; + return cmdFrom( intent, getCmds() ); } long getTimestamp( Intent intent )