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

Commit 637f1b4e authored by PauloftheWest's avatar PauloftheWest
Browse files

Fixed a Bluetooth Scanning issue.

+ When refreshing Bluetooth devices, sometimes it took awhile for some
devices to come back up.  This is a fix.

Bug: 17049458
Change-Id: Id6233b38585e003e0432707663af4d06b0ce98c2
parent f14fa7ed
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -230,10 +230,19 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
    }

    private void startScanning() {
        if (isUiRestricted()) return;
        if (isUiRestricted()) {
            return;
        }

        if (!mAvailableDevicesCategoryIsPresent) {
            getPreferenceScreen().addPreference(mAvailableDevicesCategory);
        }

        if (mAvailableDevicesCategory != null) {
            setDeviceListGroup(mAvailableDevicesCategory);
            removeAllDevices();
        }

        mLocalManager.getCachedDeviceManager().clearCachedDevices();
        mAvailableDevicesCategory.removeAll();
        mLocalAdapter.startScanning(true);