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:
Eric House 2015-07-31 07:05:39 -07:00
commit f45cafad29
2 changed files with 8 additions and 1 deletions

View file

@ -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;
@ -993,7 +994,10 @@ public class BTService extends XWService {
Set<BluetoothDevice> pairedDevs = m_adapter.getBondedDevices();
synchronized( m_addrs ) {
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() );
}
}
}
}

View file

@ -524,6 +524,9 @@ public class DelegateBase implements DlgClickNotify,
case APP_NOT_FOUND:
fmtId = R.string.app_not_found_fmt;
break;
case RELAY_ALERT:
m_dlgDelegate.eventOccurred( event, args );
break;
default:
if ( BuildConfig.DEBUG ) {
DbgUtils.logf( "DelegateBase.eventOccurred(event=%s) (DROPPED)",