Rename WifiConfig.configKey() to getKey()

Bug: 143614759
Test: atest FrameworksWifiTests
Change-Id: I708e7d8aca617a06f312be11f39cd7a1b88eb31f
diff --git a/service/java/com/android/server/wifi/CarrierNetworkEvaluator.java b/service/java/com/android/server/wifi/CarrierNetworkEvaluator.java
index 105b3c6..c9f567e 100644
--- a/service/java/com/android/server/wifi/CarrierNetworkEvaluator.java
+++ b/service/java/com/android/server/wifi/CarrierNetworkEvaluator.java
@@ -125,7 +125,7 @@
             // Check if we already have a network with the same credentials in WifiConfigManager
             // database. If yes, we should check if the network is currently blacklisted.
             WifiConfiguration existingNetwork =
-                    mWifiConfigManager.getConfiguredNetwork(config.configKey());
+                    mWifiConfigManager.getConfiguredNetwork(config.getKey());
             if (existingNetwork != null
                     && !existingNetwork.getNetworkSelectionStatus().isNetworkEnabled()
                     && !mWifiConfigManager.tryEnableNetwork(existingNetwork.networkId)) {
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index e346a94..ae5182b 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -373,7 +373,7 @@
             }
         }
         if (mVerboseLoggingEnabled) {
-            logd(dbg + " clearTargetBssid " + bssid + " key=" + config.configKey());
+            logd(dbg + " clearTargetBssid " + bssid + " key=" + config.getKey());
         }
         mTargetRoamBSSID = bssid;
         return mWifiNative.setConfiguredNetworkBSSID(mInterfaceName, bssid);
@@ -397,7 +397,7 @@
             }
         }
         if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "setTargetBssid set to " + bssid + " key=" + config.configKey());
+            Log.d(TAG, "setTargetBssid set to " + bssid + " key=" + config.getKey());
         }
         mTargetRoamBSSID = bssid;
         config.getNetworkSelectionStatus().setNetworkSelectionBSSID(bssid);
@@ -1807,7 +1807,7 @@
                 sb.append(Integer.toString(msg.arg2));
                 config = mWifiConfigManager.getConfiguredNetwork(result.netId);
                 if (config != null) {
-                    sb.append(" ").append(config.configKey());
+                    sb.append(" ").append(config.getKey());
                     sb.append(" nid=").append(config.networkId);
                     if (config.hiddenSSID) {
                         sb.append(" hidden");
@@ -1845,7 +1845,7 @@
                 sb.append(" nid=").append(mLastNetworkId);
                 config = getCurrentWifiConfiguration();
                 if (config != null) {
-                    sb.append(" ").append(config.configKey());
+                    sb.append(" ").append(config.getKey());
                 }
                 key = mWifiConfigManager.getLastSelectedNetworkConfigKey();
                 if (key != null) {
@@ -1918,7 +1918,7 @@
                 sb.append(Integer.toString(msg.arg2));
                 config = mWifiConfigManager.getConfiguredNetwork(msg.arg1);
                 if (config != null) {
-                    sb.append(" ").append(config.configKey());
+                    sb.append(" ").append(config.getKey());
                 }
                 if (mTargetRoamBSSID != null) {
                     sb.append(" ").append(mTargetRoamBSSID);
@@ -1926,7 +1926,7 @@
                 sb.append(" roam=").append(Boolean.toString(mIsAutoRoaming));
                 config = getCurrentWifiConfiguration();
                 if (config != null) {
-                    sb.append(config.configKey());
+                    sb.append(config.getKey());
                 }
                 break;
             case CMD_START_ROAM:
@@ -4627,7 +4627,7 @@
             final boolean isUsingStaticIp =
                     (currentConfig.getIpAssignment() == IpConfiguration.IpAssignment.STATIC);
             if (mVerboseLoggingEnabled) {
-                final String key = currentConfig.configKey();
+                final String key = currentConfig.getKey();
                 log("enter ObtainingIpState netId=" + Integer.toString(mLastNetworkId)
                         + " " + key + " "
                         + " roam=" + mIsAutoRoaming
@@ -5087,7 +5087,7 @@
                     logd("CMD_START_ROAM sup state "
                             + " my state " + getCurrentState().getName()
                             + " nid=" + Integer.toString(netId)
-                            + " config " + config.configKey()
+                            + " config " + config.getKey()
                             + " targetRoamBSSID " + mTargetRoamBSSID);
 
                     reportConnectionAttemptStart(config, mTargetRoamBSSID,
diff --git a/service/java/com/android/server/wifi/ConfigurationMap.java b/service/java/com/android/server/wifi/ConfigurationMap.java
index 02652a8..f8cae66 100644
--- a/service/java/com/android/server/wifi/ConfigurationMap.java
+++ b/service/java/com/android/server/wifi/ConfigurationMap.java
@@ -111,7 +111,7 @@
             return null;
         }
         for (WifiConfiguration config : mPerIDForCurrentUser.values()) {
-            if (config.configKey().equals(key)) {
+            if (config.getKey().equals(key)) {
                 return config;
             }
         }
diff --git a/service/java/com/android/server/wifi/NetworkListStoreData.java b/service/java/com/android/server/wifi/NetworkListStoreData.java
index b76f801..f5f351c 100644
--- a/service/java/com/android/server/wifi/NetworkListStoreData.java
+++ b/service/java/com/android/server/wifi/NetworkListStoreData.java
@@ -280,7 +280,7 @@
         }
         String configKeyParsed = parsedConfig.first;
         WifiConfiguration configuration = parsedConfig.second;
-        String configKeyCalculated = configuration.configKey();
+        String configKeyCalculated = configuration.getKey();
         if (!configKeyParsed.equals(configKeyCalculated)) {
             throw new XmlPullParserException(
                     "Configuration key does not match. Retrieved: " + configKeyParsed
@@ -289,13 +289,13 @@
         // Set creatorUid/creatorName for networks which don't have it set to valid value.
         String creatorName = mContext.getPackageManager().getNameForUid(configuration.creatorUid);
         if (creatorName == null) {
-            Log.e(TAG, "Invalid creatorUid for saved network " + configuration.configKey()
+            Log.e(TAG, "Invalid creatorUid for saved network " + configuration.getKey()
                     + ", creatorUid=" + configuration.creatorUid);
             configuration.creatorUid = Process.SYSTEM_UID;
             configuration.creatorName =
                     mContext.getPackageManager().getNameForUid(Process.SYSTEM_UID);
         } else if (!creatorName.equals(configuration.creatorName)) {
-            Log.w(TAG, "Invalid creatorName for saved network " + configuration.configKey()
+            Log.w(TAG, "Invalid creatorName for saved network " + configuration.getKey()
                     + ", creatorUid=" + configuration.creatorUid
                     + ", creatorName=" + configuration.creatorName);
             configuration.creatorName = creatorName;
diff --git a/service/java/com/android/server/wifi/NetworkSuggestionEvaluator.java b/service/java/com/android/server/wifi/NetworkSuggestionEvaluator.java
index 690cd97..81af4b8 100644
--- a/service/java/com/android/server/wifi/NetworkSuggestionEvaluator.java
+++ b/service/java/com/android/server/wifi/NetworkSuggestionEvaluator.java
@@ -105,7 +105,7 @@
             // database.
             WifiConfiguration wCmConfiguredNetwork =
                     mWifiConfigManager.getConfiguredNetwork(
-                            matchingNetworkSuggestion.wifiConfiguration.configKey());
+                            matchingNetworkSuggestion.wifiConfiguration.getKey());
             if (wCmConfiguredNetwork != null) {
                 // If existing network is not from suggestion, ignore.
                 if (!wCmConfiguredNetwork.fromWifiNetworkSuggestion) {
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
index 9f06340..2e0b351 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
@@ -904,7 +904,7 @@
                 Log.e(TAG, "Exception while saving config params: " + config, e);
             }
             if (!saveSuccess) {
-                loge("Failed to save variables for: " + config.configKey());
+                loge("Failed to save variables for: " + config.getKey());
                 if (!removeAllNetworks(ifaceName)) {
                     loge("Failed to remove all networks on failure.");
                 }
@@ -927,7 +927,7 @@
      */
     public boolean connectToNetwork(@NonNull String ifaceName, @NonNull WifiConfiguration config) {
         synchronized (mLock) {
-            logd("connectToNetwork " + config.configKey());
+            logd("connectToNetwork " + config.getKey());
             WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
             if (WifiConfigurationUtil.isSameNetwork(config, currentConfig)) {
                 String networkSelectionBSSID = config.getNetworkSelectionStatus()
@@ -956,7 +956,7 @@
                 Pair<SupplicantStaNetworkHal, WifiConfiguration> pair =
                         addNetworkAndSaveConfig(ifaceName, config);
                 if (pair == null) {
-                    loge("Failed to add/save network configuration: " + config.configKey());
+                    loge("Failed to add/save network configuration: " + config.getKey());
                     return false;
                 }
                 mCurrentNetworkRemoteHandles.put(ifaceName, pair.first);
@@ -966,7 +966,7 @@
                     checkSupplicantStaNetworkAndLogFailure(ifaceName, "connectToNetwork");
             if (networkHandle == null) {
                 loge("No valid remote network handle for network configuration: "
-                        + config.configKey());
+                        + config.getKey());
                 return false;
             }
 
@@ -980,7 +980,7 @@
             }
 
             if (!networkHandle.select()) {
-                loge("Failed to select network configuration: " + config.configKey());
+                loge("Failed to select network configuration: " + config.getKey());
                 return false;
             }
             return true;
@@ -1008,12 +1008,12 @@
                 return connectToNetwork(ifaceName, config);
             }
             String bssid = config.getNetworkSelectionStatus().getNetworkSelectionBSSID();
-            logd("roamToNetwork" + config.configKey() + " (bssid " + bssid + ")");
+            logd("roamToNetwork" + config.getKey() + " (bssid " + bssid + ")");
 
             SupplicantStaNetworkHal networkHandle =
                     checkSupplicantStaNetworkAndLogFailure(ifaceName, "roamToNetwork");
             if (networkHandle == null || !networkHandle.setBssid(bssid)) {
-                loge("Failed to set new bssid on network: " + config.configKey());
+                loge("Failed to set new bssid on network: " + config.getKey());
                 return false;
             }
             if (!reassociate(ifaceName)) {
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
index b69bd69..824e10e 100644
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
@@ -410,7 +410,7 @@
             if (config.isPasspoint()) {
                 metadata.put(ID_STRING_KEY_FQDN, config.FQDN);
             }
-            metadata.put(ID_STRING_KEY_CONFIG_KEY, config.configKey());
+            metadata.put(ID_STRING_KEY_CONFIG_KEY, config.getKey());
             metadata.put(ID_STRING_KEY_CREATOR_UID, Integer.toString(config.creatorUid));
             if (!setIdStr(createNetworkExtra(metadata))) {
                 Log.e(TAG, "failed to set id string");
diff --git a/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java b/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java
index 7519a24..2916c59 100644
--- a/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java
+++ b/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java
@@ -153,7 +153,7 @@
             WifiConfiguration configuration =
                     parseNetworkConfigurationFromXml(in, minorVersion, networkListTagDepth);
             if (configuration != null) {
-                Log.v(TAG, "Parsed Configuration: " + configuration.configKey());
+                Log.v(TAG, "Parsed Configuration: " + configuration.getKey());
                 configurations.add(configuration);
             }
         }
@@ -202,7 +202,7 @@
         }
         String configKeyParsed = parsedConfig.first;
         WifiConfiguration configuration = parsedConfig.second;
-        String configKeyCalculated = configuration.configKey();
+        String configKeyCalculated = configuration.getKey();
         if (!configKeyParsed.equals(configKeyCalculated)) {
             // configKey is not part of the SDK. So, we can't expect this to be the same
             // across OEM's. Just log a warning & continue.
diff --git a/service/java/com/android/server/wifi/WifiBackupRestore.java b/service/java/com/android/server/wifi/WifiBackupRestore.java
index 9dae5c9..c727501 100644
--- a/service/java/com/android/server/wifi/WifiBackupRestore.java
+++ b/service/java/com/android/server/wifi/WifiBackupRestore.java
@@ -189,7 +189,7 @@
             }
             if (!mWifiPermissionsUtil.checkConfigOverridePermission(configuration.creatorUid)) {
                 Log.d(TAG, "Ignoring network from an app with no config override permission: "
-                        + configuration.configKey());
+                        + configuration.getKey());
                 continue;
             }
             // Write this configuration data now.
@@ -369,7 +369,7 @@
                     int id = networks.keyAt(i);
                     for (WifiConfiguration configuration : configurations) {
                         // This is a dangerous lookup, but that's how it is currently written.
-                        if (configuration.configKey().hashCode() == id) {
+                        if (configuration.getKey().hashCode() == id) {
                             configuration.setIpConfiguration(networks.valueAt(i));
                         }
                     }
@@ -666,11 +666,11 @@
                             Log.e(TAG, "Configuration key was not passed, ignoring network.");
                             return null;
                         }
-                        if (!configKey.equals(configuration.configKey())) {
+                        if (!configKey.equals(configuration.getKey())) {
                             // ConfigKey mismatches are expected for private networks because the
                             // UID is not preserved across backup/restore.
                             Log.w(TAG, "Configuration key does not match. Retrieved: " + configKey
-                                    + ", Calculated: " + configuration.configKey());
+                                    + ", Calculated: " + configuration.getKey());
                         }
                         // For wpa_supplicant backup data, parse out the creatorUid to ensure that
                         // these networks were created by system apps.
@@ -679,7 +679,7 @@
                                         SupplicantStaNetworkHal.ID_STRING_KEY_CREATOR_UID));
                         if (creatorUid >= Process.FIRST_APPLICATION_UID) {
                             Log.d(TAG, "Ignoring network from non-system app: "
-                                    + configuration.configKey());
+                                    + configuration.getKey());
                             return null;
                         }
                     }
@@ -741,7 +741,7 @@
                     try {
                         WifiConfiguration wifiConfiguration = net.createWifiConfiguration();
                         if (wifiConfiguration != null) {
-                            Log.v(TAG, "Parsed Configuration: " + wifiConfiguration.configKey());
+                            Log.v(TAG, "Parsed Configuration: " + wifiConfiguration.getKey());
                             wifiConfigurations.add(wifiConfiguration);
                         }
                     } catch (NumberFormatException e) {
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index b33a357..efc9116 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -854,10 +854,10 @@
         if (internalConfig != null) {
             return internalConfig;
         }
-        internalConfig = mConfiguredNetworks.getByConfigKeyForCurrentUser(config.configKey());
+        internalConfig = mConfiguredNetworks.getByConfigKeyForCurrentUser(config.getKey());
         if (internalConfig == null) {
             Log.e(TAG, "Cannot find network with networkId " + config.networkId
-                    + " or configKey " + config.configKey());
+                    + " or configKey " + config.getKey());
         }
         return internalConfig;
     }
@@ -1264,7 +1264,7 @@
             // Since the original config provided may have had an empty
             // {@link WifiConfiguration#allowedKeyMgmt} field, check again if we already have a
             // network with the the same configkey.
-            existingInternalConfig = getInternalConfiguredNetwork(newInternalConfig.configKey());
+            existingInternalConfig = getInternalConfiguredNetwork(newInternalConfig.getKey());
         }
         // Existing network found. So, a network update.
         if (existingInternalConfig != null) {
@@ -1276,7 +1276,7 @@
             // Check for the app's permission before we let it update this network.
             if (!canModifyNetwork(existingInternalConfig, uid, packageName)) {
                 Log.e(TAG, "UID " + uid + " does not have permission to update configuration "
-                        + config.configKey());
+                        + config.getKey());
                 return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
             }
             newInternalConfig =
@@ -1288,7 +1288,7 @@
         if (WifiConfigurationUtil.hasProxyChanged(existingInternalConfig, newInternalConfig)
                 && !canModifyProxySettings(uid, packageName)) {
             Log.e(TAG, "UID " + uid + " does not have permission to modify proxy Settings "
-                    + config.configKey() + ". Must have NETWORK_SETTINGS,"
+                    + config.getKey() + ". Must have NETWORK_SETTINGS,"
                     + " or be device or profile owner.");
             return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
         }
@@ -1355,7 +1355,7 @@
 
         localLog("addOrUpdateNetworkInternal: added/updated config."
                 + " netId=" + newInternalConfig.networkId
-                + " configKey=" + newInternalConfig.configKey()
+                + " configKey=" + newInternalConfig.getKey()
                 + " uid=" + Integer.toString(newInternalConfig.creatorUid)
                 + " name=" + newInternalConfig.creatorName);
         return result;
@@ -1387,7 +1387,7 @@
         }
         if (!config.isEphemeral()) {
             // Removes the existing ephemeral network if it exists to add this configuration.
-            WifiConfiguration existingConfig = getConfiguredNetwork(config.configKey());
+            WifiConfiguration existingConfig = getConfiguredNetwork(config.getKey());
             if (existingConfig != null && existingConfig.isEphemeral()) {
                 // In this case, new connection for this config won't happen because same
                 // network is already registered as an ephemeral network.
@@ -1454,7 +1454,7 @@
             mWifiKeyStore.removeKeys(config.enterpriseConfig);
         }
 
-        removeConnectChoiceFromAllNetworks(config.configKey());
+        removeConnectChoiceFromAllNetworks(config.getKey());
         mConfiguredNetworks.remove(config.networkId);
         mScanDetailCaches.remove(config.networkId);
         // Stage the backup of the SettingsProvider package which backs this up.
@@ -1463,7 +1463,7 @@
 
         localLog("removeNetworkInternal: removed config."
                 + " netId=" + config.networkId
-                + " configKey=" + config.configKey()
+                + " configKey=" + config.getKey()
                 + " uid=" + Integer.toString(uid)
                 + " name=" + mContext.getPackageManager().getNameForUid(uid));
         return true;
@@ -1487,7 +1487,7 @@
         }
         if (!canModifyNetwork(config, uid, packageName)) {
             Log.e(TAG, "UID " + uid + " does not have permission to delete configuration "
-                    + config.configKey());
+                    + config.getKey());
             return false;
         }
         if (!removeNetworkInternal(config, uid)) {
@@ -1589,11 +1589,11 @@
                 mConfiguredNetworks.valuesForAllUsers().toArray(new WifiConfiguration[0]);
         for (WifiConfiguration config : copiedConfigs) {
             if (config.isPasspoint()) {
-                Log.d(TAG, "Removing passpoint network config " + config.configKey());
+                Log.d(TAG, "Removing passpoint network config " + config.getKey());
                 removeNetwork(config.networkId, config.creatorUid, config.creatorName);
                 didRemove = true;
             } else if (config.ephemeral) {
-                Log.d(TAG, "Removing ephemeral network config " + config.configKey());
+                Log.d(TAG, "Removing ephemeral network config " + config.getKey());
                 removeNetwork(config.networkId, config.creatorUid, config.creatorName);
                 didRemove = true;
             }
@@ -1610,7 +1610,7 @@
     public boolean removeSuggestionConfiguredNetwork(@NonNull String configKey) {
         WifiConfiguration config = getInternalConfiguredNetwork(configKey);
         if (config != null && config.ephemeral && config.fromWifiNetworkSuggestion) {
-            Log.d(TAG, "Removing suggestion network config " + config.configKey());
+            Log.d(TAG, "Removing suggestion network config " + config.getKey());
             return removeNetwork(config.networkId, config.creatorUid, config.creatorName);
         }
         return false;
@@ -1625,7 +1625,7 @@
     public boolean removePasspointConfiguredNetwork(@NonNull String configKey) {
         WifiConfiguration config = getInternalConfiguredNetwork(configKey);
         if (config != null && config.isPasspoint()) {
-            Log.d(TAG, "Removing passpoint network config " + config.configKey());
+            Log.d(TAG, "Removing passpoint network config " + config.getKey());
             return removeNetwork(config.networkId, config.creatorUid, config.creatorName);
         }
         return false;
@@ -1733,7 +1733,7 @@
             setNetworkSelectionPermanentlyDisabled(config, reason);
             setNetworkStatus(config, WifiConfiguration.Status.DISABLED);
         }
-        localLog("setNetworkSelectionStatus: configKey=" + config.configKey()
+        localLog("setNetworkSelectionStatus: configKey=" + config.getKey()
                 + " networkStatus=" + networkStatus.getNetworkStatusString() + " disableReason="
                 + networkStatus.getNetworkDisableReasonString() + " at="
                 + createDebugTimeStampString(mClock.getWallClockMillis()));
@@ -1893,7 +1893,7 @@
         }
         if (!canModifyNetwork(config, uid, packageName)) {
             Log.e(TAG, "UID " + uid + " does not have permission to update configuration "
-                    + config.configKey());
+                    + config.getKey());
             return false;
         }
         if (!updateNetworkSelectionStatus(
@@ -1930,7 +1930,7 @@
         }
         if (!canModifyNetwork(config, uid, packageName)) {
             Log.e(TAG, "UID " + uid + " does not have permission to update configuration "
-                    + config.configKey());
+                    + config.getKey());
             return false;
         }
         if (!updateNetworkSelectionStatus(
@@ -2289,7 +2289,7 @@
         if (config == null) {
             return "";
         }
-        return config.configKey();
+        return config.getKey();
     }
 
     /**
@@ -2384,7 +2384,7 @@
         }
         if (config != null) {
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "getSavedNetworkFromScanDetail Found " + config.configKey()
+                Log.v(TAG, "getSavedNetworkFromScanDetail Found " + config.getKey()
                         + " for " + scanResult.SSID + "[" + scanResult.capabilities + "]");
             }
         }
@@ -2450,7 +2450,7 @@
                     Log.v(TAG, "Updating scan detail cache freq=" + result.frequency
                             + " BSSID=" + result.BSSID
                             + " RSSI=" + result.level
-                            + " for " + config.configKey());
+                            + " for " + config.getKey());
                 }
             }
         }
@@ -2542,8 +2542,8 @@
      */
     private void linkNetworks(WifiConfiguration network1, WifiConfiguration network2) {
         if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "linkNetworks will link " + network2.configKey()
-                    + " and " + network1.configKey());
+            Log.v(TAG, "linkNetworks will link " + network2.getKey()
+                    + " and " + network1.getKey());
         }
         if (network2.linkedConfigurations == null) {
             network2.linkedConfigurations = new HashMap<>();
@@ -2553,8 +2553,8 @@
         }
         // TODO (b/30638473): This needs to become a set instead of map, but it will need
         // public interface changes and need some migration of existing store data.
-        network2.linkedConfigurations.put(network1.configKey(), 1);
-        network1.linkedConfigurations.put(network2.configKey(), 1);
+        network2.linkedConfigurations.put(network1.getKey(), 1);
+        network1.linkedConfigurations.put(network2.getKey(), 1);
     }
 
     /**
@@ -2565,20 +2565,20 @@
      */
     private void unlinkNetworks(WifiConfiguration network1, WifiConfiguration network2) {
         if (network2.linkedConfigurations != null
-                && (network2.linkedConfigurations.get(network1.configKey()) != null)) {
+                && (network2.linkedConfigurations.get(network1.getKey()) != null)) {
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "unlinkNetworks un-link " + network1.configKey()
-                        + " from " + network2.configKey());
+                Log.v(TAG, "unlinkNetworks un-link " + network1.getKey()
+                        + " from " + network2.getKey());
             }
-            network2.linkedConfigurations.remove(network1.configKey());
+            network2.linkedConfigurations.remove(network1.getKey());
         }
         if (network1.linkedConfigurations != null
-                && (network1.linkedConfigurations.get(network2.configKey()) != null)) {
+                && (network1.linkedConfigurations.get(network2.getKey()) != null)) {
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "unlinkNetworks un-link " + network2.configKey()
-                        + " from " + network1.configKey());
+                Log.v(TAG, "unlinkNetworks un-link " + network2.getKey()
+                        + " from " + network1.getKey());
             }
-            network1.linkedConfigurations.remove(network2.configKey());
+            network1.linkedConfigurations.remove(network2.getKey());
         }
     }
 
@@ -2601,7 +2601,7 @@
             return;
         }
         for (WifiConfiguration linkConfig : getInternalConfiguredNetworks()) {
-            if (linkConfig.configKey().equals(config.configKey())) {
+            if (linkConfig.getKey().equals(config.getKey())) {
                 continue;
             }
             if (linkConfig.ephemeral) {
@@ -2694,7 +2694,7 @@
             dbg.append("fetchChannelSetForNetworkForPartialScan ageInMillis ")
                     .append(ageInMillis)
                     .append(" for ")
-                    .append(config.configKey())
+                    .append(config.getKey())
                     .append(" max ")
                     .append(maxNumActiveChannelsForPartialScans);
             if (scanDetailCache != null) {
@@ -2766,7 +2766,7 @@
             Log.v(TAG, new StringBuilder("fetchChannelSetForNetworkForPnoScan ageInMillis ")
                     .append(ageInMillis)
                     .append(" for ")
-                    .append(config.configKey())
+                    .append(config.getKey())
                     .append(" bssids " + scanDetailCache.size())
                     .toString());
         }
@@ -2938,7 +2938,7 @@
             Log.d(TAG, "Found Passpoint config in disableEphemeralNetwork: "
                     + foundConfig.networkId + ", FQDN: " + foundConfig.FQDN);
         }
-        removeConnectChoiceFromAllNetworks(foundConfig.configKey());
+        removeConnectChoiceFromAllNetworks(foundConfig.getKey());
         return foundConfig;
     }
 
@@ -3137,7 +3137,7 @@
                 removedNetworkIds.add(config.networkId);
                 localLog("clearInternalUserData: removed config."
                         + " netId=" + config.networkId
-                        + " configKey=" + config.configKey());
+                        + " configKey=" + config.getKey());
                 mConfiguredNetworks.remove(config.networkId);
             }
         }
@@ -3159,7 +3159,7 @@
         for (WifiConfiguration configuration : configurations) {
             configuration.networkId = mNextNetworkId++;
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Adding network from shared store " + configuration.configKey());
+                Log.v(TAG, "Adding network from shared store " + configuration.getKey());
             }
             try {
                 mConfiguredNetworks.put(configuration);
@@ -3185,7 +3185,7 @@
         for (WifiConfiguration configuration : configurations) {
             configuration.networkId = mNextNetworkId++;
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Adding network from user store " + configuration.configKey());
+                Log.v(TAG, "Adding network from user store " + configuration.getKey());
             }
             try {
                 mConfiguredNetworks.put(configuration);
diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java
index 1dd0a48..ba95fe9 100644
--- a/service/java/com/android/server/wifi/WifiConnectivityManager.java
+++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java
@@ -783,7 +783,7 @@
             }
             return true;
         } else {
-            localLog("No scan channels for " + config.configKey() + ". Perform full band scan");
+            localLog("No scan channels for " + config.getKey() + ". Perform full band scan");
             return false;
         }
     }
diff --git a/service/java/com/android/server/wifi/WifiNetworkFactory.java b/service/java/com/android/server/wifi/WifiNetworkFactory.java
index 257b5fa..a0aa010 100644
--- a/service/java/com/android/server/wifi/WifiNetworkFactory.java
+++ b/service/java/com/android/server/wifi/WifiNetworkFactory.java
@@ -696,7 +696,7 @@
     // If the network already exists, just return the network ID of the existing network.
     private int addNetworkToWifiConfigManager(@NonNull WifiConfiguration network) {
         WifiConfiguration existingSavedNetwork =
-                mWifiConfigManager.getConfiguredNetwork(network.configKey());
+                mWifiConfigManager.getConfiguredNetwork(network.getKey());
         if (existingSavedNetwork != null) {
             if (WifiConfigurationUtil.hasCredentialChanged(existingSavedNetwork, network)) {
                 // TODO (b/142035508): What if the user has a saved network with different
@@ -724,7 +724,7 @@
 
         if (network == null) return;
         WifiConfiguration wcmNetwork =
-                mWifiConfigManager.getConfiguredNetwork(network.configKey());
+                mWifiConfigManager.getConfiguredNetwork(network.getKey());
         if (wcmNetwork == null) {
             Log.e(TAG, "Network not present in config manager");
             return;
diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java
index 6660075..c838461 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSelector.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java
@@ -535,7 +535,7 @@
      */
     private boolean setLegacyUserConnectChoice(@NonNull final WifiConfiguration selected) {
         boolean change = false;
-        String key = selected.configKey();
+        String key = selected.getKey();
         // This is only used for setting the connect choice timestamp for debugging purposes.
         long currentTime = mClock.getWallClockMillis();
         List<WifiConfiguration> configuredNetworks = mWifiConfigManager.getConfiguredNetworks();
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
index acc2fbe..c882f98 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
@@ -562,7 +562,7 @@
                         + "Removing from config manager...");
                 // will trigger a disconnect.
                 mWifiConfigManager.removeSuggestionConfiguredNetwork(
-                        activeWifiConfiguration.configKey());
+                        activeWifiConfiguration.getKey());
             }
         }
     }
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index 18cd2f9..27f20f4 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -2920,7 +2920,7 @@
                                 mWifiConfigManager.addOrUpdateNetwork(configuration, callingUid)
                                         .getNetworkId();
                         if (networkId == WifiConfiguration.INVALID_NETWORK_ID) {
-                            Log.e(TAG, "Restore network failed: " + configuration.configKey());
+                            Log.e(TAG, "Restore network failed: " + configuration.getKey());
                             continue;
                         }
                         // Enable all networks restored.
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
index f9eab6f..4e9808b 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
@@ -433,7 +433,7 @@
             // New profile changes the credential, remove the related WifiConfig.
             if (!old.equals(newProvider)) {
                 mWifiConfigManager.removePasspointConfiguredNetwork(
-                        newProvider.getWifiConfig().configKey());
+                        newProvider.getWifiConfig().getKey());
             }
         }
         mProviders.put(config.getHomeSp().getFqdn(), newProvider);
@@ -471,7 +471,7 @@
         String packageName = provider.getPackageName();
         // Remove any configs corresponding to the profile in WifiConfigManager.
         mWifiConfigManager.removePasspointConfiguredNetwork(
-                provider.getWifiConfig().configKey());
+                provider.getWifiConfig().getKey());
         mProviders.remove(fqdn);
         mWifiConfigManager.saveToStore(true /* forceWrite */);
 
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointNetworkEvaluator.java b/service/java/com/android/server/wifi/hotspot2/PasspointNetworkEvaluator.java
index 3a8f061..6396f2c 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointNetworkEvaluator.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointNetworkEvaluator.java
@@ -169,7 +169,7 @@
         }
 
         WifiConfiguration existingNetwork = mWifiConfigManager.getConfiguredNetwork(
-                config.configKey());
+                config.getKey());
         if (existingNetwork != null) {
             WifiConfiguration.NetworkSelectionStatus status =
                     existingNetwork.getNetworkSelectionStatus();
diff --git a/service/java/com/android/server/wifi/util/XmlUtil.java b/service/java/com/android/server/wifi/util/XmlUtil.java
index 9ff6554..eab53bf 100644
--- a/service/java/com/android/server/wifi/util/XmlUtil.java
+++ b/service/java/com/android/server/wifi/util/XmlUtil.java
@@ -427,7 +427,7 @@
                 XmlSerializer out, WifiConfiguration configuration,
                 @Nullable WifiConfigStoreEncryptionUtil encryptionUtil)
                 throws XmlPullParserException, IOException {
-            XmlUtil.writeNextValue(out, XML_TAG_CONFIG_KEY, configuration.configKey());
+            XmlUtil.writeNextValue(out, XML_TAG_CONFIG_KEY, configuration.getKey());
             XmlUtil.writeNextValue(out, XML_TAG_SSID, configuration.SSID);
             XmlUtil.writeNextValue(out, XML_TAG_BSSID, configuration.BSSID);
             writePreSharedKeyToXml(out, configuration.preSharedKey, encryptionUtil);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/CarrierNetworkEvaluatorTest.java b/service/tests/wifitests/src/com/android/server/wifi/CarrierNetworkEvaluatorTest.java
index 01b14a6..447cdc2 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/CarrierNetworkEvaluatorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/CarrierNetworkEvaluatorTest.java
@@ -108,13 +108,13 @@
         private Map<String, Integer> mConfigs = new HashMap<>();
 
         public void addConfig(WifiConfiguration config, int networkId) {
-            mConfigs.put(config.configKey(), networkId);
+            mConfigs.put(config.getKey(), networkId);
         }
 
         @Override
         public NetworkUpdateResult answer(InvocationOnMock invocation) throws Throwable {
             WifiConfiguration config = invocation.getArgument(0);
-            Integer networkId = mConfigs.get(config.configKey());
+            Integer networkId = mConfigs.get(config.getKey());
             if (networkId == null) return null;
 
             when(mWifiConfigManager.getConfiguredNetwork(networkId)).thenReturn(config);
@@ -261,7 +261,7 @@
         assertTrue(config4.isEphemeral());
         assertTrue(config4.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_EAP));
 
-        assertEquals(config2.configKey(), selected.configKey()); // SSID2 has the highest RSSI
+        assertEquals(config2.getKey(), selected.getKey()); // SSID2 has the highest RSSI
         assertEquals("", selected.enterpriseConfig.getAnonymousIdentity());
         assertTrue(TelephonyUtil.isSimEapMethod(selected.enterpriseConfig.getEapMethod()));
     }
@@ -375,14 +375,14 @@
                 .setNetworkSelectionStatus(
                         WifiConfiguration.NetworkSelectionStatus
                                 .NETWORK_SELECTION_PERMANENTLY_DISABLED);
-        when(mWifiConfigManager.getConfiguredNetwork(eq(blacklisted.configKey())))
+        when(mWifiConfigManager.getConfiguredNetwork(eq(blacklisted.getKey())))
                 .thenReturn(blacklisted);
         when(mWifiConfigManager.tryEnableNetwork(CARRIER1_NET_ID))
                 .thenReturn(false);
 
         WifiConfiguration selected = mDut.evaluateNetworks(scanDetails, null, null, false, false,
                 mConnectableListener);
-        verify(mWifiConfigManager).getConfiguredNetwork(eq(blacklisted.configKey()));
+        verify(mWifiConfigManager).getConfiguredNetwork(eq(blacklisted.getKey()));
 
         verify(mConnectableListener, never()).onConnectable(any(), any(), anyInt());
         assertNull(selected);
@@ -412,7 +412,7 @@
         WifiConfiguration selected = mDut.evaluateNetworks(scanDetails, null, null, false, false,
                 mConnectableListener);
 
-        assertEquals(carrierConfig.configKey(), selected.configKey());
+        assertEquals(carrierConfig.getKey(), selected.getKey());
         assertEquals("", selected.enterpriseConfig.getAnonymousIdentity());
         assertTrue(TelephonyUtil.isSimEapMethod(selected.enterpriseConfig.getEapMethod()));
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java b/service/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java
index 0b3cc45..b433d94 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ConfigurationMapTest.java
@@ -155,7 +155,7 @@
         // visible to the current user.
         for (WifiConfiguration config : configsForCurrentUser) {
             assertEquals(config, mConfigs.getForCurrentUser(config.networkId));
-            assertEquals(config, mConfigs.getByConfigKeyForCurrentUser(config.configKey()));
+            assertEquals(config, mConfigs.getByConfigKeyForCurrentUser(config.getKey()));
             final boolean wasEphemeral = config.ephemeral;
             config.ephemeral = false;
             assertNull(getEphemeralForCurrentUser(config.SSID));
@@ -168,7 +168,7 @@
         // visible to the current user.
         for (WifiConfiguration config : configsNotForCurrentUser) {
             assertNull(mConfigs.getForCurrentUser(config.networkId));
-            assertNull(mConfigs.getByConfigKeyForCurrentUser(config.configKey()));
+            assertNull(mConfigs.getByConfigKeyForCurrentUser(config.getKey()));
             final boolean wasEphemeral = config.ephemeral;
             config.ephemeral = false;
             assertNull(getEphemeralForCurrentUser(config.SSID));
@@ -202,7 +202,7 @@
         WifiConfiguration retrievedConfig =
                 mConfigs.getByScanResultForCurrentUser(scanResult);
         assertNotNull(retrievedConfig);
-        assertEquals(config.configKey(), retrievedConfig.configKey());
+        assertEquals(config.getKey(), retrievedConfig.getKey());
     }
 
     /**
diff --git a/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java b/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
index 69b7017..694dfde 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
@@ -276,12 +276,12 @@
     private byte[] getTestNetworksXmlBytes(WifiConfiguration openNetwork,
             WifiConfiguration eapNetwork) {
         String openNetworkXml = String.format(SINGLE_OPEN_NETWORK_DATA_XML_STRING_FORMAT,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid,
                 openNetwork.creatorName, openNetwork.getRandomizedMacAddress());
         String eapNetworkXml = String.format(SINGLE_EAP_NETWORK_DATA_XML_STRING_FORMAT,
-                eapNetwork.configKey().replaceAll("\"", "&quot;"),
+                eapNetwork.getKey().replaceAll("\"", "&quot;"),
                 eapNetwork.SSID.replaceAll("\"", "&quot;"),
                 eapNetwork.shared, eapNetwork.creatorUid,
                 eapNetwork.creatorName, eapNetwork.getRandomizedMacAddress());
@@ -411,7 +411,7 @@
                         + "</Network>\n";
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
         byte[] xmlData = String.format(configFormat,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid, openNetwork.getRandomizedMacAddress())
             .getBytes(StandardCharsets.UTF_8);
@@ -420,7 +420,7 @@
         WifiConfiguration deserializedConfig  = deserializedConfigs.get(0);
 
         assertEquals(openNetwork.SSID, deserializedConfig.SSID);
-        assertEquals(openNetwork.configKey(), deserializedConfig.configKey());
+        assertEquals(openNetwork.getKey(), deserializedConfig.getKey());
     }
 
     /**
@@ -478,14 +478,14 @@
         when(mPackageManager.getNameForUid(eq(openNetwork.creatorUid))).thenReturn(null);
 
         byte[] xmlData = String.format(SINGLE_OPEN_NETWORK_DATA_XML_STRING_FORMAT,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid,
                 openNetwork.creatorName, openNetwork.getRandomizedMacAddress())
             .getBytes(StandardCharsets.UTF_8);
         List<WifiConfiguration> deserializedNetworks = deserializeData(xmlData);
         assertEquals(1, deserializedNetworks.size());
-        assertEquals(openNetwork.configKey(), deserializedNetworks.get(0).configKey());
+        assertEquals(openNetwork.getKey(), deserializedNetworks.get(0).getKey());
         assertEquals(SYSTEM_UID, deserializedNetworks.get(0).creatorUid);
         assertEquals(TEST_CREATOR_NAME, deserializedNetworks.get(0).creatorName);
     }
@@ -506,14 +506,14 @@
             .thenReturn(correctCreatorName);
 
         byte[] xmlData = String.format(SINGLE_OPEN_NETWORK_DATA_XML_STRING_FORMAT,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid,
                 openNetwork.creatorName, openNetwork.getRandomizedMacAddress())
             .getBytes(StandardCharsets.UTF_8);
         List<WifiConfiguration> deserializedNetworks = deserializeData(xmlData);
         assertEquals(1, deserializedNetworks.size());
-        assertEquals(openNetwork.configKey(), deserializedNetworks.get(0).configKey());
+        assertEquals(openNetwork.getKey(), deserializedNetworks.get(0).getKey());
         assertEquals(openNetwork.creatorUid, deserializedNetworks.get(0).creatorUid);
         assertEquals(correctCreatorName, deserializedNetworks.get(0).creatorName);
     }
@@ -533,14 +533,14 @@
             .thenReturn(correctCreatorName);
 
         byte[] xmlData = String.format(SINGLE_OPEN_NETWORK_DATA_XML_STRING_FORMAT,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid,
                 openNetwork.creatorName, openNetwork.getRandomizedMacAddress())
             .getBytes(StandardCharsets.UTF_8);
         List<WifiConfiguration> deserializedNetworks = deserializeData(xmlData);
         assertEquals(1, deserializedNetworks.size());
-        assertEquals(openNetwork.configKey(), deserializedNetworks.get(0).configKey());
+        assertEquals(openNetwork.getKey(), deserializedNetworks.get(0).getKey());
         assertEquals(openNetwork.creatorUid, deserializedNetworks.get(0).creatorUid);
         assertEquals(correctCreatorName, deserializedNetworks.get(0).creatorName);
     }
@@ -554,14 +554,14 @@
         openNetwork.creatorUid = 1324422;
 
         byte[] xmlData = String.format(SINGLE_OPEN_NETWORK_DATA_XML_STRING_FORMAT,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid,
                 openNetwork.creatorName, openNetwork.getRandomizedMacAddress())
             .getBytes(StandardCharsets.UTF_8);
         List<WifiConfiguration> deserializedNetworks = deserializeData(xmlData);
         assertEquals(1, deserializedNetworks.size());
-        assertEquals(openNetwork.configKey(), deserializedNetworks.get(0).configKey());
+        assertEquals(openNetwork.getKey(), deserializedNetworks.get(0).getKey());
         assertEquals(openNetwork.creatorUid, deserializedNetworks.get(0).creatorUid);
         assertEquals(TEST_CREATOR_NAME, deserializedNetworks.get(0).creatorName);
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionEvaluatorTest.java b/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionEvaluatorTest.java
index d301d6b..46fdde6 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionEvaluatorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionEvaluatorTest.java
@@ -401,7 +401,7 @@
         verify(mWifiConfigManager, times(scanSsids.length))
                 .wasEphemeralNetworkDeleted(anyString());
         verify(mWifiConfigManager).getConfiguredNetwork(eq(
-                suggestions[0].wifiConfiguration.configKey()));
+                suggestions[0].wifiConfiguration.getKey()));
         verify(mWifiConfigManager).addOrUpdateNetwork(any(), anyInt(), anyString());
         // Verify we did not try to add any new networks or other interactions with
         // WifiConfigManager.
@@ -440,7 +440,7 @@
         suggestions[0].wifiConfiguration.ephemeral = true;
         setupAddToWifiConfigManager(suggestions[0].wifiConfiguration);
         // Existing saved network matching the credentials.
-        when(mWifiConfigManager.getConfiguredNetwork(suggestions[0].wifiConfiguration.configKey()))
+        when(mWifiConfigManager.getConfiguredNetwork(suggestions[0].wifiConfiguration.getKey()))
                 .thenReturn(suggestions[0].wifiConfiguration);
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
@@ -458,7 +458,7 @@
         // check for any saved networks.
         verify(mWifiConfigManager, times(scanSsids.length))
                 .wasEphemeralNetworkDeleted(anyString());
-        verify(mWifiConfigManager).getConfiguredNetwork(candidate.configKey());
+        verify(mWifiConfigManager).getConfiguredNetwork(candidate.getKey());
         verify(mWifiConfigManager).addOrUpdateNetwork(eq(suggestions[0].wifiConfiguration),
                 eq(suggestions[0].suggestorUid), eq(suggestions[0].suggestorPackageName));
         verify(mWifiConfigManager).getConfiguredNetwork(suggestions[0].wifiConfiguration.networkId);
@@ -552,7 +552,7 @@
         suggestions[0].wifiConfiguration.getNetworkSelectionStatus().setNetworkSelectionStatus(
                 NETWORK_SELECTION_TEMPORARY_DISABLED);
         // Existing network matching the credentials.
-        when(mWifiConfigManager.getConfiguredNetwork(suggestions[0].wifiConfiguration.configKey()))
+        when(mWifiConfigManager.getConfiguredNetwork(suggestions[0].wifiConfiguration.getKey()))
                 .thenReturn(suggestions[0].wifiConfiguration);
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
@@ -568,7 +568,7 @@
         verify(mWifiConfigManager, times(scanSsids.length))
                 .wasEphemeralNetworkDeleted(anyString());
         verify(mWifiConfigManager).getConfiguredNetwork(eq(
-                suggestions[0].wifiConfiguration.configKey()));
+                suggestions[0].wifiConfiguration.getKey()));
         verify(mWifiConfigManager).addOrUpdateNetwork(eq(suggestions[0].wifiConfiguration),
                 eq(suggestions[0].suggestorUid), eq(suggestions[0].suggestorPackageName));
         verify(mWifiConfigManager).getConfiguredNetwork(suggestions[0].wifiConfiguration.networkId);
@@ -615,7 +615,7 @@
         suggestions[0].wifiConfiguration.getNetworkSelectionStatus().setNetworkSelectionStatus(
                 NETWORK_SELECTION_TEMPORARY_DISABLED);
         // Existing network matching the credentials.
-        when(mWifiConfigManager.getConfiguredNetwork(suggestions[0].wifiConfiguration.configKey()))
+        when(mWifiConfigManager.getConfiguredNetwork(suggestions[0].wifiConfiguration.getKey()))
                 .thenReturn(suggestions[0].wifiConfiguration);
         when(mWifiConfigManager.tryEnableNetwork(suggestions[0].wifiConfiguration.networkId))
                 .thenReturn(true);
@@ -635,7 +635,7 @@
         verify(mWifiConfigManager, times(scanSsids.length))
                 .wasEphemeralNetworkDeleted(anyString());
         verify(mWifiConfigManager).getConfiguredNetwork(eq(
-                suggestions[0].wifiConfiguration.configKey()));
+                suggestions[0].wifiConfiguration.getKey()));
         verify(mWifiConfigManager).addOrUpdateNetwork(eq(suggestions[0].wifiConfiguration),
                 eq(suggestions[0].suggestorUid), eq(suggestions[0].suggestorPackageName));
         verify(mWifiConfigManager).getConfiguredNetwork(suggestions[0].wifiConfiguration.networkId);
@@ -672,7 +672,7 @@
         @Override
         public boolean matches(WifiConfiguration otherConfig) {
             if (otherConfig == null) return false;
-            return mConfig.configKey().equals(otherConfig.configKey());
+            return mConfig.getKey().equals(otherConfig.getKey());
         }
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
index f7a5a4c..9023007 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
@@ -929,7 +929,7 @@
         Map<String, String> networkExtras = new HashMap<>();
         assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
         WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-        assertEquals(config.configKey(),
+        assertEquals(config.getKey(),
                 networkExtras.get(SupplicantStaNetworkHal.ID_STRING_KEY_CONFIG_KEY));
         assertEquals(
                 config.creatorUid,
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java
index 45060a6..5b69421 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java
@@ -1083,7 +1083,7 @@
             out.write("        " + "wep_tx_keyidx=" + configuration.wepTxKeyIndex + "\n");
         }
         Map<String, String> extras = new HashMap<>();
-        extras.put(SupplicantStaNetworkHal.ID_STRING_KEY_CONFIG_KEY, configuration.configKey());
+        extras.put(SupplicantStaNetworkHal.ID_STRING_KEY_CONFIG_KEY, configuration.getKey());
         extras.put(SupplicantStaNetworkHal.ID_STRING_KEY_CREATOR_UID,
                 Integer.toString(configuration.creatorUid));
         String idString = "\"" + SupplicantStaNetworkHal.createNetworkExtra(extras) + "\"";
@@ -1106,7 +1106,7 @@
             out.writeInt(configStoreVersion);
             for (WifiConfiguration configuration : configurations) {
                 // TODO: store configKey as a string instead of calculating its hash
-                IpConfigStore.writeConfig(out, String.valueOf(configuration.configKey().hashCode()),
+                IpConfigStore.writeConfig(out, String.valueOf(configuration.getKey().hashCode()),
                         configuration.getIpConfiguration(), configStoreVersion);
             }
             out.flush();
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
index e473687..3cd9e62 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
@@ -805,7 +805,7 @@
         List<WifiConfiguration> retrievedSavedNetworks = mWifiConfigManager.getSavedNetworks(
                 Process.WIFI_UID);
         assertEquals(retrievedSavedNetworks.size(), 1);
-        assertEquals(retrievedSavedNetworks.get(0).configKey(), pskNetwork.configKey());
+        assertEquals(retrievedSavedNetworks.get(0).getKey(), pskNetwork.getKey());
         assertPasswordsMaskedInWifiConfiguration(retrievedSavedNetworks.get(0));
     }
 
@@ -830,7 +830,7 @@
         List<WifiConfiguration> retrievedSavedNetworks = mWifiConfigManager.getSavedNetworks(
                 Process.WIFI_UID);
         assertEquals(retrievedSavedNetworks.size(), 1);
-        assertEquals(retrievedSavedNetworks.get(0).configKey(), wepNetwork.configKey());
+        assertEquals(retrievedSavedNetworks.get(0).getKey(), wepNetwork.getKey());
         assertPasswordsMaskedInWifiConfiguration(retrievedSavedNetworks.get(0));
     }
 
@@ -2670,7 +2670,7 @@
                 if (otherNetwork == network) {
                     continue;
                 }
-                assertNotNull(network.linkedConfigurations.get(otherNetwork.configKey()));
+                assertNotNull(network.linkedConfigurations.get(otherNetwork.getKey()));
             }
         }
     }
@@ -2711,7 +2711,7 @@
                 if (otherNetwork == network) {
                     continue;
                 }
-                assertNotNull(network.linkedConfigurations.get(otherNetwork.configKey()));
+                assertNotNull(network.linkedConfigurations.get(otherNetwork.getKey()));
             }
         }
     }
@@ -2816,7 +2816,7 @@
                 if (otherNetwork == network) {
                     continue;
                 }
-                assertNotNull(network.linkedConfigurations.get(otherNetwork.configKey()));
+                assertNotNull(network.linkedConfigurations.get(otherNetwork.getKey()));
             }
         }
 
@@ -3131,9 +3131,9 @@
         List<WifiConfiguration> retrievedNetworks =
                 mWifiConfigManager.getConfiguredNetworksWithPasswords();
         for (WifiConfiguration network : retrievedNetworks) {
-            if (network.configKey().equals(sharedNetwork1.configKey())) {
+            if (network.getKey().equals(sharedNetwork1.getKey())) {
                 sharedNetwork1Id = network.networkId;
-            } else if (network.configKey().equals(sharedNetwork2.configKey())) {
+            } else if (network.getKey().equals(sharedNetwork2.getKey())) {
                 sharedNetwork2Id = network.networkId;
             }
         }
@@ -3159,9 +3159,9 @@
         int updatedSharedNetwork2Id = WifiConfiguration.INVALID_NETWORK_ID;
         retrievedNetworks = mWifiConfigManager.getConfiguredNetworksWithPasswords();
         for (WifiConfiguration network : retrievedNetworks) {
-            if (network.configKey().equals(sharedNetwork1.configKey())) {
+            if (network.getKey().equals(sharedNetwork1.getKey())) {
                 updatedSharedNetwork1Id = network.networkId;
-            } else if (network.configKey().equals(sharedNetwork2.configKey())) {
+            } else if (network.getKey().equals(sharedNetwork2.getKey())) {
                 updatedSharedNetwork2Id = network.networkId;
             }
         }
@@ -3214,7 +3214,7 @@
         List<WifiConfiguration> retrievedNetworks =
                 mWifiConfigManager.getConfiguredNetworksWithPasswords();
         for (WifiConfiguration network : retrievedNetworks) {
-            if (network.configKey().equals(user1Network.configKey())) {
+            if (network.getKey().equals(user1Network.getKey())) {
                 user1NetworkId = network.networkId;
             }
         }
@@ -3852,7 +3852,7 @@
         assertTrue(mWifiConfigManager.enableNetwork(
                 result.getNetworkId(), true, TEST_CREATOR_UID, TEST_CREATOR_NAME));
         assertEquals(result.getNetworkId(), mWifiConfigManager.getLastSelectedNetwork());
-        assertEquals(openNetwork.configKey(), mWifiConfigManager.getLastSelectedNetworkConfigKey());
+        assertEquals(openNetwork.getKey(), mWifiConfigManager.getLastSelectedNetworkConfigKey());
 
         assertTrue(mWifiConfigManager.removeNetwork(
                 result.getNetworkId(), TEST_CREATOR_UID, TEST_CREATOR_NAME));
@@ -3917,12 +3917,12 @@
         // Set connect choice of network 2 over network 1.
         assertTrue(
                 mWifiConfigManager.setNetworkConnectChoice(
-                        network1.networkId, network2.configKey(), 78L));
+                        network1.networkId, network2.getKey(), 78L));
 
         WifiConfiguration retrievedNetwork =
                 mWifiConfigManager.getConfiguredNetwork(network1.networkId);
         assertEquals(
-                network2.configKey(),
+                network2.getKey(),
                 retrievedNetwork.getNetworkSelectionStatus().getConnectChoice());
 
         // Remove network 3 and ensure that the connect choice on network 1 is not removed.
@@ -3930,7 +3930,7 @@
                 network3.networkId, TEST_CREATOR_UID, TEST_CREATOR_NAME));
         retrievedNetwork = mWifiConfigManager.getConfiguredNetwork(network1.networkId);
         assertEquals(
-                network2.configKey(),
+                network2.getKey(),
                 retrievedNetwork.getNetworkSelectionStatus().getConnectChoice());
 
         // Now remove network 2 and ensure that the connect choice on network 1 is removed..
@@ -3938,7 +3938,7 @@
                 network2.networkId, TEST_CREATOR_UID, TEST_CREATOR_NAME));
         retrievedNetwork = mWifiConfigManager.getConfiguredNetwork(network1.networkId);
         assertNotEquals(
-                network2.configKey(),
+                network2.getKey(),
                 retrievedNetwork.getNetworkSelectionStatus().getConnectChoice());
 
         // This should have triggered 2 buffered writes. 1 for setting the connect choice, 1 for
@@ -3991,7 +3991,7 @@
         verifyAddPasspointNetworkToWifiConfigManager(passpointNetwork);
 
         assertTrue(mWifiConfigManager.removePasspointConfiguredNetwork(
-                passpointNetwork.configKey()));
+                passpointNetwork.getKey()));
     }
 
     /**
@@ -4006,7 +4006,7 @@
         verifyAddEphemeralNetworkToWifiConfigManager(suggestedNetwork);
 
         assertTrue(mWifiConfigManager.removeSuggestionConfiguredNetwork(
-                suggestedNetwork.configKey()));
+                suggestedNetwork.getKey()));
     }
 
     /**
@@ -4794,12 +4794,12 @@
         // Set connect choice of passpoint network over saved network.
         assertTrue(
                 mWifiConfigManager.setNetworkConnectChoice(
-                        savedNetwork.networkId, passpointNetwork.configKey(), 78L));
+                        savedNetwork.networkId, passpointNetwork.getKey(), 78L));
 
         WifiConfiguration retrievedSavedNetwork =
                 mWifiConfigManager.getConfiguredNetwork(savedNetwork.networkId);
         assertEquals(
-                passpointNetwork.configKey(),
+                passpointNetwork.getKey(),
                 retrievedSavedNetwork.getNetworkSelectionStatus().getConnectChoice());
 
         // Disable the passpoint network & ensure the user choice is now removed from saved network.
@@ -5044,7 +5044,7 @@
             WifiConfiguration configuration, List<WifiConfiguration> networkList) {
         boolean foundNetworkInStoreData = false;
         for (WifiConfiguration retrievedConfig : networkList) {
-            if (retrievedConfig.configKey().equals(configuration.configKey())) {
+            if (retrievedConfig.getKey().equals(configuration.getKey())) {
                 foundNetworkInStoreData = true;
                 break;
             }
@@ -5131,7 +5131,7 @@
         int changeReason = intent.getIntExtra(WifiManager.EXTRA_CHANGE_REASON, -1);
         WifiConfiguration retrievedConfig =
                 (WifiConfiguration) intent.getExtra(WifiManager.EXTRA_WIFI_CONFIGURATION);
-        assertEquals(retrievedConfig.configKey(), configuration.configKey());
+        assertEquals(retrievedConfig.getKey(), configuration.getKey());
 
         // Verify that all the passwords are masked in the broadcast configuration.
         assertPasswordsMaskedInWifiConfiguration(retrievedConfig);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
index 7d4e04d..72bf37e 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
@@ -533,7 +533,7 @@
 
         // Setup user store XML bytes.
         String xmlString = String.format(TEST_DATA_XML_STRING_FORMAT,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid, openNetwork.creatorName,
                 openNetwork.getRandomizedMacAddress(), testSsid.replaceAll("\"", "&quot;"));
@@ -580,7 +580,7 @@
 
         // Setup expected XML bytes.
         String xmlString = String.format(TEST_DATA_XML_STRING_FORMAT,
-                openNetwork.configKey().replaceAll("\"", "&quot;"),
+                openNetwork.getKey().replaceAll("\"", "&quot;"),
                 openNetwork.SSID.replaceAll("\"", "&quot;"),
                 openNetwork.shared, openNetwork.creatorUid, openNetwork.creatorName,
                 openNetwork.getRandomizedMacAddress(), testSsid.replaceAll("\"", "&quot;"));
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
index e5bb6b3..66b84f7 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
@@ -747,10 +747,10 @@
             List<WifiConfiguration> expected, List<WifiConfiguration> actual) {
         assertEquals(expected.size(), actual.size());
         for (WifiConfiguration expectedConfiguration : expected) {
-            String expectedConfigKey = expectedConfiguration.configKey();
+            String expectedConfigKey = expectedConfiguration.getKey();
             boolean didCompare = false;
             for (WifiConfiguration actualConfiguration : actual) {
-                String actualConfigKey = actualConfiguration.configKey();
+                String actualConfigKey = actualConfiguration.getKey();
                 if (actualConfigKey.equals(expectedConfigKey)) {
                     assertConfigurationEqualForBackup(
                             expectedConfiguration, actualConfiguration);
@@ -770,10 +770,10 @@
             List<WifiConfiguration> expected, List<WifiConfiguration> actual) {
         assertEquals(expected.size(), actual.size());
         for (WifiConfiguration expectedConfiguration : expected) {
-            String expectedConfigKey = expectedConfiguration.configKey();
+            String expectedConfigKey = expectedConfiguration.getKey();
             boolean didCompare = false;
             for (WifiConfiguration actualConfiguration : actual) {
-                String actualConfigKey = actualConfiguration.configKey();
+                String actualConfigKey = actualConfiguration.getKey();
                 if (actualConfigKey.equals(expectedConfigKey)) {
                     assertConfigurationEqualForConfigManagerAddOrUpdate(
                             expectedConfiguration, actualConfiguration);
@@ -792,10 +792,10 @@
             List<WifiConfiguration> expected, List<WifiConfiguration> actual) {
         assertEquals(expected.size(), actual.size());
         for (WifiConfiguration expectedConfiguration : expected) {
-            String expectedConfigKey = expectedConfiguration.configKey();
+            String expectedConfigKey = expectedConfiguration.getKey();
             boolean didCompare = false;
             for (WifiConfiguration actualConfiguration : actual) {
-                String actualConfigKey = actualConfiguration.configKey();
+                String actualConfigKey = actualConfiguration.getKey();
                 if (actualConfigKey.equals(expectedConfigKey)) {
                     assertConfigurationEqualForConfigStore(
                             expectedConfiguration, actualConfiguration);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
index b1112e2..0673776 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
@@ -1217,7 +1217,7 @@
         // Have a saved network with the same configuration.
         WifiConfiguration matchingSavedNetwork = new WifiConfiguration(mSelectedNetwork);
         matchingSavedNetwork.networkId = TEST_NETWORK_ID_1;
-        when(mWifiConfigManager.getConfiguredNetwork(mSelectedNetwork.configKey()))
+        when(mWifiConfigManager.getConfiguredNetwork(mSelectedNetwork.getKey()))
                 .thenReturn(matchingSavedNetwork);
 
         // Now trigger user selection to one of the network.
@@ -1639,7 +1639,7 @@
         wcmNetwork.creatorName = TEST_PACKAGE_NAME_1;
         wcmNetwork.fromWifiNetworkSpecifier = true;
         wcmNetwork.ephemeral = true;
-        when(mWifiConfigManager.getConfiguredNetwork(mSelectedNetwork.configKey()))
+        when(mWifiConfigManager.getConfiguredNetwork(mSelectedNetwork.getKey()))
                 .thenReturn(wcmNetwork);
         mWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
         // Verify that we triggered a disconnect.
@@ -2931,7 +2931,7 @@
         @Override
         public boolean matches(WifiConfiguration otherConfig) {
             if (otherConfig == null) return false;
-            return mConfig.configKey().equals(otherConfig.configKey());
+            return mConfig.getKey().equals(otherConfig.getKey());
         }
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
index d1860c9..09bab3d 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
@@ -715,9 +715,9 @@
                 NetworkSelectionStatus.NETWORK_SELECTION_ENABLE);
         verify(mWifiConfigManager).clearNetworkConnectChoice(selectedWifiConfig.networkId);
         verify(mWifiConfigManager).setNetworkConnectChoice(configInLastNetworkSelection.networkId,
-                selectedWifiConfig.configKey(), mClock.getWallClockMillis());
+                selectedWifiConfig.getKey(), mClock.getWallClockMillis());
         verify(mWifiConfigManager, never()).setNetworkConnectChoice(
-                configNotInLastNetworkSelection.networkId, selectedWifiConfig.configKey(),
+                configNotInLastNetworkSelection.networkId, selectedWifiConfig.getKey(),
                 mClock.getWallClockMillis());
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java
index 74954a8..4b35edf 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java
@@ -255,7 +255,7 @@
                 .then(new AnswerWithArguments() {
                     public WifiConfiguration answer(String configKey) {
                         for (WifiConfiguration config : configs) {
-                            if (TextUtils.equals(config.configKey(), configKey)) {
+                            if (TextUtils.equals(config.getKey(), configKey)) {
                                 return new WifiConfiguration(config);
                             }
                         }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
index 4d839bb..dd5937b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
@@ -1561,7 +1561,7 @@
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList, TEST_UID_1,
                         TEST_PACKAGE_1));
         verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
-                networkSuggestion.wifiConfiguration.configKey());
+                networkSuggestion.wifiConfiguration.getKey());
     }
 
     /**
@@ -1597,7 +1597,7 @@
                 mWifiNetworkSuggestionsManager.remove(new ArrayList<>(), TEST_UID_1,
                         TEST_PACKAGE_1));
         verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
-                networkSuggestion.wifiConfiguration.configKey());
+                networkSuggestion.wifiConfiguration.getKey());
     }
 
 
@@ -1646,7 +1646,7 @@
         // Now remove the current connected app and ensure we did trigger a disconnect.
         mWifiNetworkSuggestionsManager.removeApp(TEST_PACKAGE_1);
         verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
-                networkSuggestion1.wifiConfiguration.configKey());
+                networkSuggestion1.wifiConfiguration.getKey());
 
         // Now remove the other app and ensure we did not trigger a disconnect.
         mWifiNetworkSuggestionsManager.removeApp(TEST_PACKAGE_2);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
index 58c84af..1fb2465 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
@@ -640,7 +640,7 @@
         assertTrue(mManager.removeProvider(TEST_CREATOR_UID, false, TEST_FQDN));
         verify(provider).uninstallCertsAndKeys();
         verify(mWifiConfigManager).removePasspointConfiguredNetwork(
-                provider.getWifiConfig().configKey());
+                provider.getWifiConfig().getKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallation();
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallSuccess();
@@ -686,7 +686,7 @@
         assertTrue(mManager.removeProvider(TEST_UID, true, TEST_FQDN));
         verify(provider).uninstallCertsAndKeys();
         verify(mWifiConfigManager).removePasspointConfiguredNetwork(
-                provider.getWifiConfig().configKey());
+                provider.getWifiConfig().getKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallation();
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallSuccess();
@@ -780,7 +780,7 @@
         assertTrue(mManager.addOrUpdateProvider(newConfig, TEST_CREATOR_UID, TEST_PACKAGE, false));
         verifyInstalledConfig(newConfig);
         verify(mWifiConfigManager).removePasspointConfiguredNetwork(
-                newProvider.getWifiConfig().configKey());
+                newProvider.getWifiConfig().getKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderInstallation();
         verify(mWifiMetrics).incrementNumPasspointProviderInstallSuccess();
@@ -1772,7 +1772,7 @@
         assertFalse(mManager.removeProvider(TEST_UID, false, TEST_FQDN));
         verify(provider, never()).uninstallCertsAndKeys();
         verify(mWifiConfigManager, never()).removePasspointConfiguredNetwork(
-                provider.getWifiConfig().configKey());
+                provider.getWifiConfig().getKey());
         verify(mWifiConfigManager, never()).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallation();
         verify(mWifiMetrics, never()).incrementNumPasspointProviderUninstallSuccess();
@@ -1791,7 +1791,7 @@
         assertTrue(mManager.removeProvider(TEST_CREATOR_UID, false, TEST_FQDN));
         verify(provider).uninstallCertsAndKeys();
         verify(mWifiConfigManager).removePasspointConfiguredNetwork(
-                provider.getWifiConfig().configKey());
+                provider.getWifiConfig().getKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallation();
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallSuccess();
@@ -1837,7 +1837,7 @@
         // This should be no WifiConfig deletion
         assertTrue(mManager.addOrUpdateProvider(origConfig, TEST_CREATOR_UID, TEST_PACKAGE, true));
         verify(mWifiConfigManager, never()).removePasspointConfiguredNetwork(
-                origProvider.getWifiConfig().configKey());
+                origProvider.getWifiConfig().getKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderInstallation();
         verify(mWifiMetrics).incrementNumPasspointProviderInstallSuccess();
@@ -1857,7 +1857,7 @@
                 eq(true))).thenReturn(newProvider);
         assertTrue(mManager.addOrUpdateProvider(newConfig, TEST_CREATOR_UID, TEST_PACKAGE, true));
         verify(mWifiConfigManager).removePasspointConfiguredNetwork(
-                newProvider.getWifiConfig().configKey());
+                newProvider.getWifiConfig().getKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderInstallation();
         verify(mWifiMetrics).incrementNumPasspointProviderInstallSuccess();
@@ -1908,7 +1908,7 @@
                 eq(false))).thenReturn(newProvider);
         assertTrue(mManager.addOrUpdateProvider(newConfig, TEST_CREATOR_UID, TEST_PACKAGE, false));
         verify(mWifiConfigManager).removePasspointConfiguredNetwork(
-                newProvider.getWifiConfig().configKey());
+                newProvider.getWifiConfig().getKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderInstallation();
         verify(mWifiMetrics).incrementNumPasspointProviderInstallSuccess();
@@ -1962,7 +1962,7 @@
                 eq(true))).thenReturn(newProvider);
         assertFalse(mManager.addOrUpdateProvider(newConfig, TEST_CREATOR_UID, TEST_PACKAGE1, true));
         verify(mWifiConfigManager, never()).removePasspointConfiguredNetwork(
-                newProvider.getWifiConfig().configKey());
+                newProvider.getWifiConfig().getKey());
         verify(mWifiConfigManager, never()).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderInstallation();
         verify(mWifiMetrics, never()).incrementNumPasspointProviderInstallSuccess();
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
index b0b80cb..36f8b6f 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
@@ -560,7 +560,7 @@
         retrieved =
                 deserializeWifiConfiguration(
                         serializeWifiConfigurationForBackup(configuration));
-        assertEquals(retrieved.first, retrieved.second.configKey());
+        assertEquals(retrieved.first, retrieved.second.getKey());
         WifiConfigurationTestUtil.assertConfigurationEqualForBackup(
                 configuration, retrieved.second);
     }
@@ -578,7 +578,7 @@
         retrieved =
                 deserializeWifiConfiguration(
                         serializeWifiConfigurationForConfigStore(configuration));
-        assertEquals(retrieved.first, retrieved.second.configKey());
+        assertEquals(retrieved.first, retrieved.second.getKey());
         WifiConfigurationTestUtil.assertConfigurationEqualForConfigStore(
                 configuration, retrieved.second);
     }