use of org.fdroid.fdroid.nearby.peers.BluetoothPeer in project fdroidclient by f-droid.
the class BluetoothManager method sendFoundBroadcast.
private static void sendFoundBroadcast(Context context, BluetoothDevice device) {
BluetoothPeer bluetoothPeer = BluetoothPeer.getInstance(device);
if (bluetoothPeer == null) {
Utils.debugLog(TAG, "IGNORING: " + device);
return;
}
Intent intent = new Intent(ACTION_FOUND);
intent.putExtra(EXTRA_PEER, bluetoothPeer);
intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
}
Aggregations