Merge "Turn off WifiTetherSettings page." into oc-mr1-dev
diff --git a/src/com/android/settings/wifi/WifiApEnabler.java b/src/com/android/settings/wifi/WifiApEnabler.java
index 675bf28..2a8015b 100644
--- a/src/com/android/settings/wifi/WifiApEnabler.java
+++ b/src/com/android/settings/wifi/WifiApEnabler.java
@@ -81,7 +81,7 @@
mContext = context;
mDataSaverBackend = dataSaverBackend;
mSwitch = switchPreference;
- mOriginalSummary = switchPreference.getSummary();
+ mOriginalSummary = context.getText(R.string.wifi_hotspot_off_subtext);
switchPreference.setPersistent(false);
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
diff --git a/src/com/android/settings/wifi/tether/WifiTetherSettings.java b/src/com/android/settings/wifi/tether/WifiTetherSettings.java
index 5dcdeab..3a1d5c6 100644
--- a/src/com/android/settings/wifi/tether/WifiTetherSettings.java
+++ b/src/com/android/settings/wifi/tether/WifiTetherSettings.java
@@ -46,7 +46,7 @@
implements WifiTetherBasePreferenceController.OnTetherConfigUpdateListener {
public static boolean isTetherSettingPageEnabled() {
- return SystemProperties.getBoolean("settings.ui.wifi.tether.enabled", true);
+ return SystemProperties.getBoolean("settings.ui.wifi.tether.enabled", false);
}
private static final IntentFilter TETHER_STATE_CHANGE_FILTER;
diff --git a/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java b/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
index 26a711b..add988c 100644
--- a/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
+++ b/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
@@ -16,6 +16,12 @@
package com.android.settings.wifi.tether;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static com.google.common.truth.Truth.assertThat;
+
import android.app.Instrumentation;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
@@ -33,11 +39,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class WifiTetherSettingsTest {
@@ -64,6 +65,11 @@
}
@Test
+ public void verifyPageIsDisabledByDefault() {
+ assertThat(WifiTetherSettings.isTetherSettingPageEnabled()).isFalse();
+ }
+
+ @Test
public void launchTetherSettings_shouldHaveAllFields() {
launchWifiTetherActivity();
onView(withText("Network name")).check(matches(isDisplayed()));