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

Commit b3730b86 authored by Quang Luong's avatar Quang Luong Committed by Android (Google) Code Review
Browse files

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

parents dc6a988e eafca1bb
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));