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

Commit 93be8cb3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Update SCAN MODE state based on the storage value"

parents 7565f640 7f0122af
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -506,8 +506,18 @@ class AdapterProperties {
                    /* mDiscoverableTimeout is part of the
                       adapterPropertyChangedCallback received before
                       onBluetoothReady */
                    switch (mScanMode) {
                        case BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE:
                            if (mDiscoverableTimeout != 0)
                                setScanMode(AbstractionLayer.BT_SCAN_MODE_CONNECTABLE);
                            else
                                setScanMode(AbstractionLayer.BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE);
                            break;
                        case BluetoothAdapter.SCAN_MODE_NONE:
                        case BluetoothAdapter.SCAN_MODE_CONNECTABLE:
                        default:
                            setScanMode(AbstractionLayer.BT_SCAN_MODE_CONNECTABLE);
                    }
                    /* though not always required, this keeps NV up-to date on first-boot after flash */
                    setDiscoverableTimeout(mDiscoverableTimeout);
            }