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

Commit 733ea267 authored by Eric Schwarzenbach's avatar Eric Schwarzenbach
Browse files

Use NetworkKey factory methods instead of constructor.

Bug: 34346278
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java

Change-Id: I5f7e4e3268a3d7e372d1098f423b389784765807
parent 213791f7
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -452,8 +452,7 @@ public class AccessPoint implements Comparable<AccessPoint> {

        // set mSpeed to the connected ScanResult if the AccessPoint is the active network
        if (isActive() && mInfo != null) {
            NetworkKey key = new NetworkKey(new WifiKey(
                    AccessPoint.convertToQuotedString(ssid), mInfo.getBSSID()));
            NetworkKey key = NetworkKey.createFromWifiInfo(mInfo);
            ScoredNetwork score = scoreCache.getScoredNetwork(key);
            if (score != null) {
                mSpeed = score.calculateBadge(mInfo.getRssi());
@@ -476,8 +475,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
        mIsScoredNetworkMetered = false;

        if (isActive() && mInfo != null) {
            NetworkKey key = new NetworkKey(new WifiKey(
                    AccessPoint.convertToQuotedString(ssid), mInfo.getBSSID()));
            NetworkKey key = NetworkKey.createFromWifiInfo(mInfo);
            ScoredNetwork score = scoreCache.getScoredNetwork(key);
            if (score != null) {
                mIsScoredNetworkMetered |= score.meteredHint;