Skip to content
Snippets Groups Projects
Commit a9f7570d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "BluetoothClass: Use mask to get MajorDeviceClass"

parents b8fca94c 89bf3952
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment