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

Commit b2bfdbca authored by Roman Birg's avatar Roman Birg
Browse files

Settings: fix BT switch enabling discoverable mode



Change-Id: I6b2dff88fb858d34a1b534705b2c67f5ab4c2d29
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent e7c80de7
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -134,8 +134,6 @@ public final class BluetoothEnabler extends GenericSwitchToggle {
                setChecked(true);
                setEnabled(true);
                updateSearchIndex(true);
                // enable page and inquiry scan
                mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
                break;
            case BluetoothAdapter.STATE_TURNING_OFF:
                setEnabled(false);
+4 −0
Original line number Diff line number Diff line
@@ -187,6 +187,10 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
        if (mBluetoothEnabler != null) {
            mBluetoothEnabler.resume(getActivity());
        }
        if (mLocalAdapter != null) {
            // enable page and inquiry scan
            mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
        }
        super.onResume();

        mInitiateDiscoverable = true;