Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5e5c2b0 authored by Myles Watson's avatar Myles Watson
Browse files

BluetoothClass: Use mask to get MajorDeviceClass

Bug: 174650196
Test: compiles
Change-Id: I6042a02fa329c5291aa7b9719907485e748582bf
parent 3b98ee1d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
        }