summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src/com/android/server
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-07-02 12:26:41 -0700
committerRoshan Pius <rpius@google.com>2019-07-02 13:26:34 -0700
commit7abed5d4cf741aca02836d06664263dc1e3aa699 (patch)
treefcec130dab89d969a4255fcd722e1cc9c1cf8a44 /tests/wifitests/src/com/android/server
parentd2aff57d0254d5597bb0e771fa20a2093c2e04ca (diff)
downloadandroid_frameworks_opt_net_wifi-7abed5d4cf741aca02836d06664263dc1e3aa699.tar.gz
android_frameworks_opt_net_wifi-7abed5d4cf741aca02836d06664263dc1e3aa699.tar.bz2
android_frameworks_opt_net_wifi-7abed5d4cf741aca02836d06664263dc1e3aa699.zip
WifiNetworkSuggestionsManager: Persist user approval immediately
User approval decisions are not currently triggering a disk persistence. If the app does not modify any of it's suggestions, then this approval bit may not get persisted. Bug: 136565650 Test: atest com.android.server.wifi Test: NetworkSuggestion ACTS test Change-Id: I8796132fa3cc6356b9f4d43c9d3ffcdd72f7c89a
Diffstat (limited to 'tests/wifitests/src/com/android/server')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java8
1 files changed, 8 insertions, 0 deletions
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.