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

Commit 11a22bdc authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "BluetoothClass: Use mask to get MajorDeviceClass" am: a9f7570de6 am: c8947263

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1516221

Change-Id: I9b320189fa9bcfac4f23e2bda4452c399cf75f9d
parents bf9b0afb c8947263
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;
        }