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

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

Merge "Added AccessPoint.matches(AccessPoint) method to match AP objects" into qt-dev

am: b3730b86

Change-Id: Ifbe25344452864098f64bd42ec1fc1e2948ab9f9
parents 29fd36a4 b3730b86
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -337,6 +337,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
        mContext = context;
        networkId = config.networkId;
        mConfig = config;
        mFqdn = config.FQDN;
        setScanResultsPasspoint(homeScans, roamingScans);
        updateKey();
    }
@@ -673,6 +674,13 @@ public class AccessPoint implements Comparable<AccessPoint> {
        return mKey;
    }

    /**
     * Determines if the other AccessPoint represents the same network as this AccessPoint
     */
    public boolean matches(AccessPoint other) {
        return getKey().equals(other.getKey());
    }

    public boolean matches(WifiConfiguration config) {
        if (config.isPasspoint()) {
            return (isPasspoint() && config.FQDN.equals(mConfig.FQDN));