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

Commit 343fface 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

Change-Id: Ib5df8e0d31858b309bcd3110d553ab9415e6a9e8
parents 4a3040b7 f34f600c
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);