Loading android/app/src/com/android/bluetooth/btservice/AdapterService.java +18 −0 Original line number Diff line number Diff line Loading @@ -742,6 +742,17 @@ public class AdapterService extends Service { return service.getRemoteName(device); } public int getRemoteType(BluetoothDevice device) { if (!Utils.checkCaller()) { Log.w(TAG,"getRemoteType(): not allowed for non-active user"); return BluetoothDevice.DEVICE_TYPE_UNKNOWN; } AdapterService service = getService(); if (service == null) return BluetoothDevice.DEVICE_TYPE_UNKNOWN; return service.getRemoteType(device); } public String getRemoteAlias(BluetoothDevice device) { if (!Utils.checkCaller()) { Log.w(TAG,"getRemoteAlias(): not allowed for non-active user"); Loading Loading @@ -1199,6 +1210,13 @@ public class AdapterService extends Service { return deviceProp.getName(); } int getRemoteType(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device); if (deviceProp == null) return BluetoothDevice.DEVICE_TYPE_UNKNOWN; return deviceProp.getDeviceType(); } String getRemoteAlias(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device); Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +2 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ final class RemoteDevices { } /** * * @return mDeviceType */ int getDeviceType() { Loading Loading @@ -290,6 +289,8 @@ final class RemoteDevices { sendUuidIntent(bdDevice); break; case AbstractionLayer.BT_PROPERTY_TYPE_OF_DEVICE: // The device type from hal layer, defined in bluetooth.h, // matches the type defined in BluetoothDevice.java device.mDeviceType = Utils.byteArrayToInt(val); break; case AbstractionLayer.BT_PROPERTY_REMOTE_RSSI: Loading Loading
android/app/src/com/android/bluetooth/btservice/AdapterService.java +18 −0 Original line number Diff line number Diff line Loading @@ -742,6 +742,17 @@ public class AdapterService extends Service { return service.getRemoteName(device); } public int getRemoteType(BluetoothDevice device) { if (!Utils.checkCaller()) { Log.w(TAG,"getRemoteType(): not allowed for non-active user"); return BluetoothDevice.DEVICE_TYPE_UNKNOWN; } AdapterService service = getService(); if (service == null) return BluetoothDevice.DEVICE_TYPE_UNKNOWN; return service.getRemoteType(device); } public String getRemoteAlias(BluetoothDevice device) { if (!Utils.checkCaller()) { Log.w(TAG,"getRemoteAlias(): not allowed for non-active user"); Loading Loading @@ -1199,6 +1210,13 @@ public class AdapterService extends Service { return deviceProp.getName(); } int getRemoteType(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device); if (deviceProp == null) return BluetoothDevice.DEVICE_TYPE_UNKNOWN; return deviceProp.getDeviceType(); } String getRemoteAlias(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device); Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +2 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,6 @@ final class RemoteDevices { } /** * * @return mDeviceType */ int getDeviceType() { Loading Loading @@ -290,6 +289,8 @@ final class RemoteDevices { sendUuidIntent(bdDevice); break; case AbstractionLayer.BT_PROPERTY_TYPE_OF_DEVICE: // The device type from hal layer, defined in bluetooth.h, // matches the type defined in BluetoothDevice.java device.mDeviceType = Utils.byteArrayToInt(val); break; case AbstractionLayer.BT_PROPERTY_REMOTE_RSSI: Loading