Turns the #BluetoothDevice into a human-readable string.
(BluetoothDevice device)
| 95 | * Turns the #BluetoothDevice into a human-readable string. |
| 96 | */ |
| 97 | public static String getDisplayString(BluetoothDevice device) { |
| 98 | String name = device.getName(); |
| 99 | String address = device.getAddress(); |
| 100 | |
| 101 | if (name == null) |
| 102 | return address; |
| 103 | |
| 104 | return name + " [" + address + "]"; |
| 105 | } |
| 106 | |
| 107 | public static String getDisplayString(BluetoothSocket socket) { |
| 108 | return getDisplayString(socket.getRemoteDevice()); |
no outgoing calls
no test coverage detected