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

Commit 354f227e 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>
(cherry picked from commit b17a8424)
parent be9d667b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -134,8 +134,6 @@ public final class BluetoothEnabler implements SwitchBar.OnSwitchChangeListener
                setChecked(true);
                mSwitch.setEnabled(true);
                updateSearchIndex(true);
                // enable page and inquiry scan
                mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
                break;
            case BluetoothAdapter.STATE_TURNING_OFF:
                mSwitch.setEnabled(false);
+4 −0
Original line number Diff line number Diff line
@@ -165,6 +165,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;