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

Commit 715cb63a authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "Bluetooth: remove suspended scan client when app calls stopScan" am:...

Merge "Bluetooth: remove suspended scan client when app calls stopScan" am: e1146202 am: cf842964

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2238064



Change-Id: I335bad988ecb496314622b29973ce7b649265125
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 483aba7c cf842964
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -305,6 +305,9 @@ public class ScanManager {
        if (client == null) {
            client = mScanNative.getRegularScanClient(scannerId);
        }
        if (client == null) {
            client = mScanNative.getSuspendedScanClient(scannerId);
        }
        sendMessage(MSG_STOP_BLE_SCAN, client);
    }

@@ -1273,6 +1276,15 @@ public class ScanManager {
            return null;
        }

        ScanClient getSuspendedScanClient(int scannerId) {
            for (ScanClient client : mSuspendedScanClients) {
                if (client.scannerId == scannerId) {
                    return client;
                }
            }
            return null;
        }

        void stopBatchScan(ScanClient client) {
            mBatchClients.remove(client);
            removeScanFilters(client.scannerId);