* String ´bluetooth_select_a2dp_codec_type_help_info´
is set on the ´preference_widget_dialog_summary´-dialog
by default.
Test: make Settings, visual observation
Signed-off-by: Timi Rautamäki <timi.rautamaki@gmail.com>
Change-Id: I6d403f231797bcf5b10bf726cca4e128f4c517ea
The value of PRIVATE_DNS_MODE_* has changed from String to int and
ConnectivityManager provides 2 new APIs to set and get private
DNS mode, the caller can use them directly and doesn't need to update
Settings by itself.
Bug: 185311744
Test: 1. make RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest
2. make RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest
Change-Id: I47706efe9c53a00438fdec97fda244638cecb3dc
Merged-In: I47706efe9c53a00438fdec97fda244638cecb3dc
(Cherry-picked from ag/14230401)
Context is more useful than ContentResolver, it can provide more
information if we want to change the behavior in the future.
Bug: 172183305
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest
Change-Id: I6c06460b67f81112db311f0739457d5f1e2e4554
Merged-In: I6c06460b67f81112db311f0739457d5f1e2e4554
PRIVATE_DNS_DEFAULT_MODE_FALLBACK has removed, use
ConnectivityManager#getPrivateDnsMode() to get the value of
private DNS instead of querying settings and implementing logic
by itself.
Bug: 172183305
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest
Change-Id: I024c3ddfb85f4c3d177e2e99294c998d81d4e08d
Merged-In: I024c3ddfb85f4c3d177e2e99294c998d81d4e08d
The guava implementation is more accurate than the basic NetworkUtils
implementation.
NetworkUtils is being moved to its own JAR and will not be available
from Settings.
Bug: 174436414
Test: m
Wrote test for isWeaklyValidatedHostname, verified it passes with
guava
Change-Id: I1d01f2beba36009e17f651652e2d7f57be5aa398
Converting to Soong will move some code from directly compiled
into the app to compiled into an Android library and then
shared between the app and the tests. This will cause resource
IDs in the library to become non-final, which means they can
no longer be used in case statements. Convert affect case
statements to if blocks.
Test: m RunSettingsRoboTests
Change-Id: I25742a374f06d3fa4decbfc0d223a350acc50881
When the Private DNS setting is disabled via a user restriction, show
information to the user explaining that they cannot change this setting
due to IT admin policy.
Testing steps:
* Installed & configured TestDPC on the device.
* Made sure that the Private DNS setting is usable.
* Set the user restriction via TestDPC ("User Restrictions" -> "Disallow
config Private DNS").
* Navigated to Settings -> Network & Internet -> Advanced
* Observed that Private DNS is greyed out and the Restricted icon is
showing.
* Observed that when tapping either the icon or the greyed-out text I
get a dialog with policy information.
Implementation notes:
I have not utilized the existing RestrictedPreference as the Private DNS
mode preference extends CustomDialogPreferenceCompat.
I have also not utilized the RestrictedPreferenceHelper as it modifies
the summary shown for the preference. This preference has its own
summary (showing the current state of Private DNS configuration) which I
did not want to override.
Bug: 112982691
Test: Manual, see above.
Change-Id: I9b7496b5b2cbb26012d889369f2199239cd2e00f
Since Private DNS host may now be set by the admin via the
DevicePolicyManager, extract the verification code to the
ConnectivityManager so it can be used both from Settings and framework
code.
Bug: 112982691
Test: See cts tests.
Change-Id: Ic091e4714f8d3f9f28042bc825cf57c991504f27
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
This patch focused on fixing compile errors and some runtime errors.
Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
This setting can be used to change the in-code default.
Test: as follows
- built, flashed, booted
- make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest passes
- make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest passes
Bug: 79719289
Change-Id: I27e5fb9cc66dde1df72395c22179bca3f62ef782
Also: fix a bug where the actual current mode is not read correctly
from settings on initialization.
Test: as follows
- built, flashed, booted
- manual test behaves as expected
- make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest passes
- make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest passes
Bug: 34953048
Bug: 64133961
Change-Id: I0b845b3894a47b837abf5de273d1ada642ef5a23
For obvious bootstrapping reasons, DNS settings have always used
IP address string literals in input fields.
However, since we can use the network-assigned nameservers to bootstrap
our way to multiple IP addresses of multiple families (!), hostnames
provide a clear simplicity and future-proofing advantage.
Permitting IP address literals means not only making sure that we can
validate X.509v3 certificates for IP addresses, but coping with the
inevitable broken configurations where users may have configured IPv4
addresses but no IPv6 addresses. This will unnecessarily complicate
life on IPv6-only networks.
=)
Test: as follows
- built
- flashed
- booted
- tried to enter IP string literals
- make -j50 RunSettingsRoboTests ROBOTEST_FILTER=PrivateDnsModeDialogPreferenceTest
Bug: 34953048
Bug: 64133961
Bug: 73641539
Change-Id: I7a58e86ed640ff5600906fb3d8cb9a2c75598831
Bug: 64133961
Fixes: 74844869
Test: visual test and interaction
also updated tests and checked they pass
Change-Id: I7c8d50e5941c2a7dd46014932bdace14dc222c80