summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-12-03 19:00:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-12-03 19:00:23 +0000
commita9f7570de6fb8d87da260e4255f13eda91e4aba9 (patch)
tree356d2c6c286e071fd549a8be423cd6bdf3c854a2
parentb8fca94cfe6b018e1b16403695e2f34dec4f4e2e (diff)
parent89bf39528f9bf9eba93a654e76b5f48f4331a144 (diff)
Merge "BluetoothClass: Use mask to get MajorDeviceClass"
-rwxr-xr-xcore/java/android/bluetooth/BluetoothClass.java4
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;
}