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

Commit 4686e5f8 authored by William Escande's avatar William Escande
Browse files

CreateBond: check for Bluetooth ON

Bug: 328842244
Fix: 328842244
Test: None
Flag: Exempt simple control flow
Change-Id: Iff6e999bf2a127d4f020bc69b6acb0d72f55bde8
parent 1b5e82aa
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4850,6 +4850,11 @@ public class AdapterService extends Service {
            return deviceProp.getBondState() == BluetoothDevice.BOND_BONDING;
        }

        if (!isEnabled()) {
            Log.e(TAG, "Impossible to call createBond when Bluetooth is not enabled");
            return false;
        }

        if (!isPackageNameAccurate(this, callingPackage, Binder.getCallingUid())) {
            return false;
        }