Add ability to show/hide different device information.

This introduces 3 boolean flags:

config_show_device_model
config_show_wifi_ip_address
config_show_wifi_mac_address

Which when set to false will hide their individual panes from "About
Phone" page.

Bug: 62414913
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.deviceinfo
Change-Id: Iaaf91ef41c9ec7b5bf233344e6a48d4b87fad291
This commit is contained in:
Ben Lin
2018-01-30 16:17:45 -08:00
parent 7245bbb3d5
commit 7190f85392
6 changed files with 33 additions and 2 deletions

View File

@@ -69,10 +69,16 @@ public class DeviceModelPreferenceControllerTest {
}
@Test
public void isAlwaysAvailable() {
public void isAvailable_returnTrueIfVisible() {
assertThat(mController.isAvailable()).isTrue();
}
@Test
@Config(qualifiers = "mcc999")
public void isAvailable_returnFalseIfNotVisible() {
assertThat(mController.isAvailable()).isFalse();
}
@Test
public void displayPref_shouldSetSummary() {
mController.displayPreference(mPreferenceScreen);