Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.os.Looper; import android.os.Message; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.SystemProperties; import android.util.Log; import com.android.bluetooth.BluetoothStatsLog; Loading Loading @@ -860,6 +861,12 @@ final class RemoteDevices { errorLog("Device Properties is null for Device:" + device); return; } boolean restrict_device_found = SystemProperties.getBoolean("bluetooth.restrict_discovered_device.enabled", false); if (restrict_device_found && (deviceProp.mName == null || deviceProp.mName.isEmpty())) { debugLog("Device name is null or empty: " + device); return; } Intent intent = new Intent(BluetoothDevice.ACTION_FOUND); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); Loading system/bta/dm/bta_dm_act.cc +2 −0 Original line number Diff line number Diff line Loading @@ -1914,6 +1914,8 @@ static void bta_dm_inq_results_cb(tBTM_INQ_RESULTS* p_inq, const uint8_t* p_eir, result.inq_res.p_eir = const_cast<uint8_t*>(p_eir); result.inq_res.eir_len = eir_len; result.inq_res.ble_evt_type = p_inq->ble_evt_type; p_inq_info = BTM_InqDbRead(p_inq->remote_bd_addr); if (p_inq_info != NULL) { /* initialize remt_name_not_required to false so that we get the name by Loading system/btif/src/btif_dm.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1401,6 +1401,17 @@ static void btif_dm_search_devices_evt(tBTA_DM_SEARCH_EVT event, status = btif_storage_set_remote_addr_type(&bdaddr, addr_type); ASSERTC(status == BT_STATUS_SUCCESS, "failed to save remote addr type (inquiry)", status); bool restrict_report = osi_property_get_bool( "bluetooth.restrict_discovered_device.enabled", false); if (restrict_report && p_search_data->inq_res.device_type == BT_DEVICE_TYPE_BLE && !(p_search_data->inq_res.ble_evt_type & BTM_BLE_CONNECTABLE_MASK)) { LOG_INFO("%s: Ble device is not connectable", ADDRESS_TO_LOGGABLE_CSTR(bdaddr)); break; } /* Callback to notify upper layer of device */ GetInterfaceToProfiles()->events->invoke_device_found_cb(num_properties, properties); Loading Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +7 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.os.Looper; import android.os.Message; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.SystemProperties; import android.util.Log; import com.android.bluetooth.BluetoothStatsLog; Loading Loading @@ -860,6 +861,12 @@ final class RemoteDevices { errorLog("Device Properties is null for Device:" + device); return; } boolean restrict_device_found = SystemProperties.getBoolean("bluetooth.restrict_discovered_device.enabled", false); if (restrict_device_found && (deviceProp.mName == null || deviceProp.mName.isEmpty())) { debugLog("Device name is null or empty: " + device); return; } Intent intent = new Intent(BluetoothDevice.ACTION_FOUND); intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); Loading
system/bta/dm/bta_dm_act.cc +2 −0 Original line number Diff line number Diff line Loading @@ -1914,6 +1914,8 @@ static void bta_dm_inq_results_cb(tBTM_INQ_RESULTS* p_inq, const uint8_t* p_eir, result.inq_res.p_eir = const_cast<uint8_t*>(p_eir); result.inq_res.eir_len = eir_len; result.inq_res.ble_evt_type = p_inq->ble_evt_type; p_inq_info = BTM_InqDbRead(p_inq->remote_bd_addr); if (p_inq_info != NULL) { /* initialize remt_name_not_required to false so that we get the name by Loading
system/btif/src/btif_dm.cc +11 −0 Original line number Diff line number Diff line Loading @@ -1401,6 +1401,17 @@ static void btif_dm_search_devices_evt(tBTA_DM_SEARCH_EVT event, status = btif_storage_set_remote_addr_type(&bdaddr, addr_type); ASSERTC(status == BT_STATUS_SUCCESS, "failed to save remote addr type (inquiry)", status); bool restrict_report = osi_property_get_bool( "bluetooth.restrict_discovered_device.enabled", false); if (restrict_report && p_search_data->inq_res.device_type == BT_DEVICE_TYPE_BLE && !(p_search_data->inq_res.ble_evt_type & BTM_BLE_CONNECTABLE_MASK)) { LOG_INFO("%s: Ble device is not connectable", ADDRESS_TO_LOGGABLE_CSTR(bdaddr)); break; } /* Callback to notify upper layer of device */ GetInterfaceToProfiles()->events->invoke_device_found_cb(num_properties, properties); Loading