Merge "wifi: Fix unnecessary notification after restoring config from cloud." into tm-qpr-dev am: 818d809993

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19395538

Change-Id: I8f301a781ba66a26bbcd56271e9e036779626df7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-07-29 15:12:29 +00:00
committed by Automerger Merge Worker

View File

@@ -1076,7 +1076,9 @@ public class SettingsBackupAgent extends BackupAgentHelper {
SoftApConfiguration storedConfig = mWifiManager.getSoftApConfiguration(); SoftApConfiguration storedConfig = mWifiManager.getSoftApConfiguration();
if (isNeedToNotifyUserConfigurationHasChanged(configInCloud, storedConfig)) { 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); WifiSoftApConfigChangedNotifier.notifyUserOfConfigConversion(this);
} }
} }
@@ -1115,9 +1117,6 @@ public class SettingsBackupAgent extends BackupAgentHelper {
== storedConfig.getBridgedModeOpportunisticShutdownTimeoutMillis() == storedConfig.getBridgedModeOpportunisticShutdownTimeoutMillis()
&& Objects.equals(configInCloud.getVendorElements(), && Objects.equals(configInCloud.getVendorElements(),
storedConfig.getVendorElements()) storedConfig.getVendorElements())
&& (configInCloud.getPersistentRandomizedMacAddress() != null
? Objects.equals(configInCloud.getPersistentRandomizedMacAddress(),
storedConfig.getPersistentRandomizedMacAddress()) : true)
&& Arrays.equals(configInCloud.getAllowedAcsChannels( && Arrays.equals(configInCloud.getAllowedAcsChannels(
SoftApConfiguration.BAND_2GHZ), SoftApConfiguration.BAND_2GHZ),
storedConfig.getAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ)) storedConfig.getAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ))