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

Commit f34f600c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents e2ce2e00 af15d3de
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);