wifi: Fix unnecessary notification after restoring config from cloud.
The persistent randomzied MAC address is generated by hash function with key Ssid. It might be different in different device even if the key doesn't be changed. But the persist randomized MAC is not a user setting, it is generated by the frameworks. Ahe user would need to set up the ACL again anyways even if they use factory MAC. So it should not to notify user configuration is changed since it is not a user setting and user aware it since user is using a new device. BUg: 235591501 Test: Manual test, no notification show up. Change-Id: I08fef497df0c42115ee61e92a22009d32666da41
This commit is contained in:
@@ -1076,7 +1076,9 @@ public class SettingsBackupAgent extends BackupAgentHelper {
|
||||
SoftApConfiguration storedConfig = mWifiManager.getSoftApConfiguration();
|
||||
|
||||
if (isNeedToNotifyUserConfigurationHasChanged(configInCloud, storedConfig)) {
|
||||
Log.d(TAG, "restored ap configuration requires a conversion, notify the user");
|
||||
Log.d(TAG, "restored ap configuration requires a conversion, notify the user"
|
||||
+ ", configInCloud is " + configInCloud + " but storedConfig is "
|
||||
+ storedConfig);
|
||||
WifiSoftApConfigChangedNotifier.notifyUserOfConfigConversion(this);
|
||||
}
|
||||
}
|
||||
@@ -1115,9 +1117,6 @@ public class SettingsBackupAgent extends BackupAgentHelper {
|
||||
== storedConfig.getBridgedModeOpportunisticShutdownTimeoutMillis()
|
||||
&& Objects.equals(configInCloud.getVendorElements(),
|
||||
storedConfig.getVendorElements())
|
||||
&& (configInCloud.getPersistentRandomizedMacAddress() != null
|
||||
? Objects.equals(configInCloud.getPersistentRandomizedMacAddress(),
|
||||
storedConfig.getPersistentRandomizedMacAddress()) : true)
|
||||
&& Arrays.equals(configInCloud.getAllowedAcsChannels(
|
||||
SoftApConfiguration.BAND_2GHZ),
|
||||
storedConfig.getAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ))
|
||||
|
||||
Reference in New Issue
Block a user