Add a boolean flag to show or hide Private DNS in Network & internet.

The following boolean flag is added:
config_show_private_dns_settings

When set to false, Private DNS will not be shown in Network & internet.

Bug: 111398942
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest
Change-Id: I62911930680355b7fc109b295d8526bdb7eac0b3
This commit is contained in:
Ben Lin
2018-07-26 12:06:48 -07:00
parent c879386e5a
commit bc4b584446
4 changed files with 21 additions and 1 deletions

View File

@@ -80,7 +80,9 @@ public class PrivateDnsPreferenceController extends BasePreferenceController
@Override
public int getAvailabilityStatus() {
return AVAILABLE;
return mContext.getResources().getBoolean(R.bool.config_show_private_dns_settings)
? AVAILABLE
: UNSUPPORTED_ON_DEVICE;
}
@Override