diff options
author | Chiachang Wang <chiachangwang@google.com> | 2019-04-18 07:35:19 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-04-18 07:35:19 +0000 |
commit | 96eb8158a359dd82bac4f8c6808f072c65337f72 (patch) | |
tree | 59df7e230cb46f43faef398b0919ac6af8f2fa1f /tests/src | |
parent | ac5b899a4e58be9c014e5dbf24132f1c0bc97cff (diff) | |
parent | 79a6da3acdcec4041e49d7bcc1b24af7183eb697 (diff) |
Merge "Move Setting constants for NetworkStack"
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/server/connectivity/NetworkMonitorTest.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/src/com/android/server/connectivity/NetworkMonitorTest.java b/tests/src/com/android/server/connectivity/NetworkMonitorTest.java index fa41284..7d9eb9b 100644 --- a/tests/src/com/android/server/connectivity/NetworkMonitorTest.java +++ b/tests/src/com/android/server/connectivity/NetworkMonitorTest.java @@ -26,6 +26,9 @@ import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_EVALUATION_TYPE; import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_MIN_EVALUATE_INTERVAL; import static android.net.util.DataStallUtils.CONFIG_DATA_STALL_VALID_DNS_TIME_THRESHOLD; import static android.net.util.DataStallUtils.DATA_STALL_EVALUATION_TYPE_DNS; +import static android.net.util.NetworkStackUtils.CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS; +import static android.net.util.NetworkStackUtils.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS; +import static android.net.util.NetworkStackUtils.CAPTIVE_PORTAL_USE_HTTPS; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertFalse; @@ -159,7 +162,7 @@ public class NetworkMonitorTest { when(mDependencies.getRandom()).thenReturn(mRandom); when(mDependencies.getSetting(any(), eq(Settings.Global.CAPTIVE_PORTAL_MODE), anyInt())) .thenReturn(Settings.Global.CAPTIVE_PORTAL_MODE_PROMPT); - when(mDependencies.getSetting(any(), eq(Settings.Global.CAPTIVE_PORTAL_USE_HTTPS), + when(mDependencies.getDeviceConfigPropertyInt(any(), eq(CAPTIVE_PORTAL_USE_HTTPS), anyInt())).thenReturn(1); when(mDependencies.getSetting(any(), eq(Settings.Global.CAPTIVE_PORTAL_HTTP_URL), any())) .thenReturn(TEST_HTTP_URL); @@ -682,13 +685,13 @@ public class NetworkMonitorTest { } private void setOtherFallbackUrls(String urls) { - when(mDependencies.getSetting(any(), - eq(Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS), any())).thenReturn(urls); + when(mDependencies.getDeviceConfigProperty(any(), + eq(CAPTIVE_PORTAL_OTHER_FALLBACK_URLS), any())).thenReturn(urls); } private void setFallbackSpecs(String specs) { - when(mDependencies.getSetting(any(), - eq(Settings.Global.CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS), any())).thenReturn(specs); + when(mDependencies.getDeviceConfigProperty(any(), + eq(CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS), any())).thenReturn(specs); } private void setCaptivePortalMode(int mode) { |