summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-08-14 12:04:07 -0700
committerXin Li <delphij@google.com>2019-08-14 12:04:07 -0700
commitfdc57ad9b227b1faad82dfccbd8fbd7d5254105e (patch)
treefcec130dab89d969a4255fcd722e1cc9c1cf8a44
parentf8907c82848c4486611742d6d26635f0bd094251 (diff)
parentd4296d24a4ba39a23208b15b20036dc402da0acb (diff)
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master
Bug: 134405016 Change-Id: I4a7833ba6a0a2ca074600aa444ff167879454a47
-rw-r--r--service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java1
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java8
2 files changed, 9 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
index c2aade90b..6a5db5d23 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
@@ -714,6 +714,7 @@ public class WifiNetworkSuggestionsManager {
Log.v(TAG, "Setting the app " + (approved ? "approved" : "not approved"));
}
perAppInfo.hasUserApproved = approved;
+ saveToStore();
}
/**
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
index ca7c13e31..ade54bd14 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
@@ -1817,6 +1817,10 @@ public class WifiNetworkSuggestionsManagerTest {
// Cancel the notification.
verify(mNotificationManger).cancel(SystemMessage.NOTE_NETWORK_SUGGESTION_AVAILABLE);
+ // Verify config store interactions.
+ verify(mWifiConfigManager, times(2)).saveToStore(true);
+ assertTrue(mDataSource.hasNewDataToSerialize());
+
reset(mNotificationManger);
// We should not resend the notification next time the network is found in scan results.
mWifiNetworkSuggestionsManager.getNetworkSuggestionsForScanDetail(
@@ -1858,6 +1862,10 @@ public class WifiNetworkSuggestionsManagerTest {
// Cancel the notification.
verify(mNotificationManger).cancel(SystemMessage.NOTE_NETWORK_SUGGESTION_AVAILABLE);
+ // Verify config store interactions.
+ verify(mWifiConfigManager, times(2)).saveToStore(true);
+ assertTrue(mDataSource.hasNewDataToSerialize());
+
reset(mNotificationManger);
// Now trigger the app-ops callback to ensure we remove all of their suggestions.