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 6a0cb9b67..f0277f0c7 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 @@ -969,15 +969,20 @@ public class BTService extends XWService { Set pairedDevs = m_adapter.getBondedDevices(); // DbgUtils.logf( "ping: got %d paired devices", pairedDevs.size() ); for ( BluetoothDevice dev : pairedDevs ) { - String btAddr = dev.getAddress(); - - if ( sendPing( dev, 0 ) ) { // did we get a reply? - if ( null != addrs ) { - addrs.add( dev ); - } - if ( null != event ) { - postEvent( event, dev.getName() ); + // Skip things that can't host an Android app + int clazz = dev.getBluetoothClass().getMajorDeviceClass(); + if ( Major.PHONE == clazz || Major.COMPUTER == clazz ) { + if ( sendPing( dev, 0 ) ) { // did we get a reply? + if ( null != addrs ) { + addrs.add( dev ); + } + if ( null != event ) { + postEvent( event, dev.getName() ); + } } + } else { + Log.d( TAG, "skipping %s; not an android device!", + dev.getName() ); } } } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java index 441e3d67b..253118efd 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/XWApp.java @@ -50,8 +50,6 @@ public class XWApp extends Application implements LifecycleObserver { public static final boolean LOCUTILS_ENABLED = false; public static final boolean CONTEXT_MENUS_ENABLED = true; public static final boolean OFFER_DUALPANE = false; - // BT class "COMPUTERS" includes tablets like the Nexus 9 - public static final boolean BT_SCAN_COMPUTERS = true; public static final String SMS_PUBLIC_HEADER = "-XW4"; public static final int MAX_TRAY_TILES = 7; // comtypes.h