Merge "Turn off WifiTetherSettings page." into oc-mr1-dev

am: b9da1117d0

Change-Id: I4f027adb993a7971f83d3fd659a86dc4392ae57e
This commit is contained in:
Fan Zhang
2017-09-20 16:33:48 +00:00
committed by android-build-merger
3 changed files with 13 additions and 7 deletions

View File

@@ -81,7 +81,7 @@ public class WifiApEnabler {
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);

View File

@@ -46,7 +46,7 @@ public class WifiTetherSettings extends RestrictedDashboardFragment
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;

View File

@@ -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.Before;
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 {
@@ -63,6 +64,11 @@ public class WifiTetherSettingsTest {
mDevice.pressHome();
}
@Test
public void verifyPageIsDisabledByDefault() {
assertThat(WifiTetherSettings.isTetherSettingPageEnabled()).isFalse();
}
@Test
public void launchTetherSettings_shouldHaveAllFields() {
launchWifiTetherActivity();