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

Commit d79969fd authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Fix ConcurrentModificationException in GattService.onScanResult" am: 098f4e10

am: 35d82a50

Change-Id: I9379156bfaf9b6e0d9c4e5342d25ee2e4273deda
parents 2d415bcc 35d82a50
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -40,11 +40,13 @@ import com.android.bluetooth.btservice.AdapterService;
import com.android.internal.app.IBatteryStats;

import java.util.ArrayDeque;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

@@ -95,8 +97,8 @@ public class ScanManager {
    private CountDownLatch mLatch;

    ScanManager(GattService service) {
        mRegularScanClients = new HashSet<ScanClient>();
        mBatchClients = new HashSet<ScanClient>();
        mRegularScanClients = Collections.newSetFromMap(new ConcurrentHashMap<ScanClient, Boolean>());
        mBatchClients = Collections.newSetFromMap(new ConcurrentHashMap<ScanClient, Boolean>());
        mService = service;
        mScanNative = new ScanNative();
        curUsedTrackableAdvertisements = 0;