Added AccessPoint.matches(AccessPoint) method to match AP objects

Previously there was no single method to match two AccessPoint objects
that represent the same method. This provides a clear method to match
AccessPoints of the same network (especially Passpoint networks).

Test: atest AccessPointTest
Bug: 130373102

Change-Id: I14eae0e331a5253f4be52c2835b5629172ca23ba
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index 1976ec4..d1e4fdf 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -337,6 +337,7 @@
         mContext = context;
         networkId = config.networkId;
         mConfig = config;
+        mFqdn = config.FQDN;
         setScanResultsPasspoint(homeScans, roamingScans);
         updateKey();
     }
@@ -673,6 +674,13 @@
         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));