Back to project page LibGeppa.
The source code is released under:
Apache License
If you think the Android project LibGeppa listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.cattaka.libgeppa.bluetooth; /*from ww w .j a v a2 s . c om*/ import java.util.HashSet; import java.util.Set; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; public class BluetoothAdapterWrapper implements IBluetoothAdapter { private BluetoothAdapter adapter; public BluetoothAdapterWrapper(BluetoothAdapter adapter) { super(); this.adapter = adapter; } public boolean isEnabled() { return adapter.isEnabled(); } @Override public Set<IBluetoothDevice> getBondedDevices() { Set<IBluetoothDevice> devices = new HashSet<IBluetoothDevice>(); for (BluetoothDevice rawDevice : adapter.getBondedDevices()) { devices.add(new BluetoothDeviceWrapper(rawDevice)); } return devices; } }