mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
add only phones and computers to list of possible BT opponent devices
This commit is contained in:
parent
cb7b8660dc
commit
8acba7e092
1 changed files with 5 additions and 1 deletions
|
@ -23,6 +23,7 @@ package org.eehouse.android.xw4;
|
|||
import android.app.Activity;
|
||||
import android.app.Service;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothClass.Device.Major;
|
||||
import android.bluetooth.BluetoothClass;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothServerSocket;
|
||||
|
@ -974,10 +975,13 @@ public class BTService extends XWService {
|
|||
Set<BluetoothDevice> pairedDevs = m_adapter.getBondedDevices();
|
||||
synchronized( m_addrs ) {
|
||||
for ( BluetoothDevice dev : pairedDevs ) {
|
||||
int clazz = dev.getBluetoothClass().getMajorDeviceClass();
|
||||
if ( Major.PHONE == clazz || Major.COMPUTER == clazz ) {
|
||||
m_addrs.add( dev.getAddress() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendNames()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue