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

Commit aae3bcb2 authored by Quang Luong's avatar Quang Luong Committed by android-build-merger
Browse files

Merge "Synchronized WifiTracker scan result cache update logic" into qt-dev am: f34f600c

am: 343fface

Change-Id: Id839ba48865967bb6c72e1361633eb6cf4256e00
parents 67567fb7 343fface
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -555,8 +555,6 @@ public class WifiTracker implements LifecycleObserver, OnStart, OnStop, OnDestro
                configsByKey.put(AccessPoint.getKey(config), config);
            }
        }
        ArrayMap<String, List<ScanResult>> scanResultsByApKey =
                updateScanResultCache(newScanResults);

        WifiConfiguration connectionConfig = null;
        if (mLastInfo != null) {
@@ -566,6 +564,9 @@ public class WifiTracker implements LifecycleObserver, OnStart, OnStop, OnDestro
        // Rather than dropping and reacquiring the lock multiple times in this method, we lock
        // once for efficiency of lock acquisition time and readability
        synchronized (mLock) {
            ArrayMap<String, List<ScanResult>> scanResultsByApKey =
                    updateScanResultCache(newScanResults);

            // Swap the current access points into a cached list for maintaining AP listeners
            List<AccessPoint> cachedAccessPoints;
            cachedAccessPoints = new ArrayList<>(mInternalAccessPoints);