diff options
| author | 2020-12-02 20:48:08 -0800 | |
|---|---|---|
| committer | 2020-12-02 20:48:08 -0800 | |
| commit | 89bf39528f9bf9eba93a654e76b5f48f4331a144 (patch) | |
| tree | 691c386217e89fc4cf07f84a6fa0d21b6a60ab00 | |
| parent | deb1024b75454d21ee723c33ba7ff435cd96f5a8 (diff) | |
BluetoothClass: Use mask to get MajorDeviceClass
Bug: 174650196
Test: compiles
Change-Id: I6042a02fa329c5291aa7b9719907485e748582bf
| -rwxr-xr-x | core/java/android/bluetooth/BluetoothClass.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothClass.java b/core/java/android/bluetooth/BluetoothClass.java index 905b0ceec4ee..1e92fc0568e0 100755 --- a/core/java/android/bluetooth/BluetoothClass.java +++ b/core/java/android/bluetooth/BluetoothClass.java @@ -425,13 +425,13 @@ public final class BluetoothClass implements Parcelable { return false; } } else if (profile == PROFILE_HID) { - return (getDeviceClass() & Device.Major.PERIPHERAL) == Device.Major.PERIPHERAL; + return getMajorDeviceClass() == Device.Major.PERIPHERAL; } else if (profile == PROFILE_PANU || profile == PROFILE_NAP) { // No good way to distinguish between the two, based on class bits. if (hasService(Service.NETWORKING)) { return true; } - return (getDeviceClass() & Device.Major.NETWORKING) == Device.Major.NETWORKING; + return getMajorDeviceClass() == Device.Major.NETWORKING; } else { return false; } |