summaryrefslogtreecommitdiffstats
path: root/core/tests/ConnectivityManagerTest/src
diff options
context:
space:
mode:
authorXia Wang <xiaw@google.com>2012-09-25 22:32:36 -0700
committerXia Wang <xiaw@google.com>2012-09-26 09:23:59 -0700
commit3272a38dbc5fdf2d68b653592a244059cd29255a (patch)
tree0b84a492b42d45743bb03b130af212e036b64bc4 /core/tests/ConnectivityManagerTest/src
parent2832136bb6fcace61ef078051e94aa0a841aac15 (diff)
downloadframeworks_base-3272a38dbc5fdf2d68b653592a244059cd29255a.zip
frameworks_base-3272a38dbc5fdf2d68b653592a244059cd29255a.tar.gz
frameworks_base-3272a38dbc5fdf2d68b653592a244059cd29255a.tar.bz2
Fix Wifi Stress test after wifi settings are moved to Settings.global
Change-Id: I823e99b39bc340683b686bb0dd43a473865656f0
Diffstat (limited to 'core/tests/ConnectivityManagerTest/src')
-rw-r--r--core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java
index 39e2cf2..79d928c 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java
@@ -219,15 +219,16 @@ public class WifiStressTest
// Stress Wifi reconnection to secure net after sleep
@LargeTest
public void testWifiReconnectionAfterSleep() {
- int value = Settings.System.getInt(mRunner.getContext().getContentResolver(),
- Settings.System.WIFI_SLEEP_POLICY, -1);
- if (value < 0) {
- Settings.System.putInt(mRunner.getContext().getContentResolver(),
- Settings.System.WIFI_SLEEP_POLICY, Settings.System.WIFI_SLEEP_POLICY_DEFAULT);
+ int value = Settings.Global.getInt(mRunner.getContext().getContentResolver(),
+ Settings.Global.WIFI_SLEEP_POLICY, -1);
+ log("wifi sleep policy is: " + value);
+ if (value != Settings.Global.WIFI_SLEEP_POLICY_DEFAULT) {
+ Settings.Global.putInt(mRunner.getContext().getContentResolver(),
+ Settings.Global.WIFI_SLEEP_POLICY, Settings.Global.WIFI_SLEEP_POLICY_DEFAULT);
log("set wifi sleep policy to default value");
}
- Settings.Secure.putLong(mRunner.getContext().getContentResolver(),
- Settings.Secure.WIFI_IDLE_MS, WIFI_IDLE_MS);
+ Settings.Global.putLong(mRunner.getContext().getContentResolver(),
+ Settings.Global.WIFI_IDLE_MS, WIFI_IDLE_MS);
// Connect to a Wi-Fi network
WifiConfiguration config = new WifiConfiguration();