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) {
final int callbackType = settings.getCallbackType();
// If onlost/onfound is requested, a non-empty filter is expected
if ((callbackType & ScanSettings.CALLBACK_TYPE_FIRST_MATCH
| ScanSettings.CALLBACK_TYPE_MATCH_LOST) != 0) {
if ((callbackType & (ScanSettings.CALLBACK_TYPE_FIRST_MATCH
| ScanSettings.CALLBACK_TYPE_MATCH_LOST)) != 0) {
if (filterList == null) {
return false;
}