summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-07-04 03:17:45 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-07-04 03:17:45 +0000
commit913ba58040d1fff70462f24b79e881a936152026 (patch)
tree67f55b5cec0f9a6c15ce2468bde4e83895cfab3c
parent34040424459864ab85d0cba224006b5b9d18198f (diff)
parenta8153646b0c113f2cb5bcc1c565e9998c4f125f2 (diff)
Snap for 5706862 from a8153646b0c113f2cb5bcc1c565e9998c4f125f2 to qt-c2f2-release
Change-Id: I55960a9d6e684018b602534adbb53ba29e871544
-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 35db1b0b2..ec15e1c93 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
@@ -717,6 +717,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 98e5178d7..8d33fae36 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
@@ -1870,6 +1870,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(
@@ -1911,6 +1915,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.