mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +01:00
Merge branch 'android_branch' into relay_noconn
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
This commit is contained in:
commit
f45cafad29
2 changed files with 8 additions and 1 deletions
|
@ -23,6 +23,7 @@ package org.eehouse.android.xw4;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
|
import android.bluetooth.BluetoothClass.Device.Major;
|
||||||
import android.bluetooth.BluetoothClass;
|
import android.bluetooth.BluetoothClass;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
import android.bluetooth.BluetoothServerSocket;
|
import android.bluetooth.BluetoothServerSocket;
|
||||||
|
@ -993,7 +994,10 @@ public class BTService extends XWService {
|
||||||
Set<BluetoothDevice> pairedDevs = m_adapter.getBondedDevices();
|
Set<BluetoothDevice> pairedDevs = m_adapter.getBondedDevices();
|
||||||
synchronized( m_addrs ) {
|
synchronized( m_addrs ) {
|
||||||
for ( BluetoothDevice dev : pairedDevs ) {
|
for ( BluetoothDevice dev : pairedDevs ) {
|
||||||
m_addrs.add( dev.getAddress() );
|
int clazz = dev.getBluetoothClass().getMajorDeviceClass();
|
||||||
|
if ( Major.PHONE == clazz || Major.COMPUTER == clazz ) {
|
||||||
|
m_addrs.add( dev.getAddress() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -524,6 +524,9 @@ public class DelegateBase implements DlgClickNotify,
|
||||||
case APP_NOT_FOUND:
|
case APP_NOT_FOUND:
|
||||||
fmtId = R.string.app_not_found_fmt;
|
fmtId = R.string.app_not_found_fmt;
|
||||||
break;
|
break;
|
||||||
|
case RELAY_ALERT:
|
||||||
|
m_dlgDelegate.eventOccurred( event, args );
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if ( BuildConfig.DEBUG ) {
|
if ( BuildConfig.DEBUG ) {
|
||||||
DbgUtils.logf( "DelegateBase.eventOccurred(event=%s) (DROPPED)",
|
DbgUtils.logf( "DelegateBase.eventOccurred(event=%s) (DROPPED)",
|
||||||
|
|
Loading…
Add table
Reference in a new issue