Fix onLost/onFound logic in isSettingsAndFilterComboAllowed

bug: b/20185066

Change-Id: If9e3fecd12ee86aa12fa63688babeff694bee62e
This commit is contained in:
tturney
2015-04-13 14:55:07 -07:00
parent 238e0f934f
commit ab5267a403

View File

@ -409,8 +409,8 @@ public final class BluetoothLeScanner {
List <ScanFilter> filterList) { List <ScanFilter> filterList) {
final int callbackType = settings.getCallbackType(); final int callbackType = settings.getCallbackType();
// If onlost/onfound is requested, a non-empty filter is expected // If onlost/onfound is requested, a non-empty filter is expected
if ((callbackType & ScanSettings.CALLBACK_TYPE_FIRST_MATCH if ((callbackType & (ScanSettings.CALLBACK_TYPE_FIRST_MATCH
| ScanSettings.CALLBACK_TYPE_MATCH_LOST) != 0) { | ScanSettings.CALLBACK_TYPE_MATCH_LOST)) != 0) {
if (filterList == null) { if (filterList == null) {
return false; return false;
} }