Code refactor for clean up some internal dependencies.
Bug: 213836977
Test: Junit VpnPreferenceControllerTest
Change-Id: Ib6684c7b84bd04d9c1a015fa78d2c0ac5f1773c8
Move some logic out of constructor to reduce the loading when launch UI.
Bug: 213836977
Test: Junit VpnPreferenceControllerTest
Change-Id: I90c7770f529b4710196697886e566dfe1be629e4
insecure vpns
Although in english, the strings can be "N not secure", in other
languages translators have requested that we add "VPN" or "VPNs" after
the number for extra clarity. Thus, we split the string into two
depending on whether there is just one or more than one insecure VPN.
Bug: 184167494
Test: atest -c SettingsUnitTests
Change-Id: I93f0cbec5f22ffcac70ddc2ecf640729eef29c04
If there is an insecure VPN, don't display the name of the vpn in the
summary. Instead, display "Not secure" if there is only 1 total vpn
available, and display the number of insecure VPNs + " not secure."
Screenshot: https://screenshot.googleplex.com/9Bxn7frDm7aVHtG
Test: manual test (because the junit test for the controller has not yet
been cherrypicked into sc-dev)
Bug: 176821216
Change-Id: Ie454d9605effd5208457e8c91b08cc382d4992af
New VpnInfoPreference created to control the presence or absence
of the warning icon based on the vpn type.
The VpnPreferenceController type casts the preference based on
whether the provider model is enabled. It also detects legacy vpns
by using the LegacyVpnProfileStore, and comparing VPN profile
usernames with the active VPN config's user.
Screenshot: https://screenshot.googleplex.com/AfGrH8wRusTvbf4
Test: atest -c SettingsUnitTests
Bug: Bug: 176821216
Change-Id: I1aa93be5b90b404d9d9cb9bf47ea76fdc9aad401
Merged-In: I1aa93be5b90b404d9d9cb9bf47ea76fdc9aad401
(cherry picked from commit 7a68eb3b5e)
The VPN code is moving out of ConnectivityService to a new
VpnManagerService. Update Settings to call into the VpnManager
class instead of using the AIDL interface directly. This way,
the VPN code can be moved without touching Settings.
Bug: 173331190
Test: builds, boots
Test: manually verified VPN settings page
Change-Id: Id2731a166b5d6783acb1c711a54604b69aa8c0d7
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.
This causes a lot of trivial code changes.
I also updated the ordering of the imports in all affected files.
Bug: 110953302
Test: Built
make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Change pref key for airplane mode to "airplane_mode" to match the
constant declared in SettingsSlicesContract.
Bug: 80106671
Test: robotests
Change-Id: I898befffbdafc3004fc127414edd04f60ff2554e
- for legacy vpn config, we do not get the vpn name to show in the
preference summary, and we used to simply show "Connected" as the summary
text. However, the string was changed to include the connected device
name as the parameter. Change to use connected summary string that does
not requires any parameter.
Change-Id: Ia6191eb315f5f23e0e6bf8da2a9537c211e8188e
Fixes: 77618408
Test: make RunSettingsRoboTests
Bug: 64133961
Fixes: 74844869
Test: visual test and interaction
also updated tests and checked they pass
Change-Id: I7c8d50e5941c2a7dd46014932bdace14dc222c80
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.
Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
&& make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
Also removed the check about secondary users. We already disable
adding a legacy VPN for secondary users inside the Settings page
itself.
We do not want to stop our users from configuring/disabling third
party VPNs, that's completely supported.
Bug: 23693383
Fix: 32308780
Test: manual, needs robotest
Change-Id: I99ab14b6b26582bdd7fc491c4b2542f3e653f3dc
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
- Add a ProgressiveDisclosureMixin that contains all logic for collapse
preference list when it's too long
- Refactored PreferenceController's updateState to take a preference
instead of PreferenceScreen, because with progressive disclosure the
preference can either be in screen or the mixin. DashboardFragment is
responsible finding the preference before passing it to controller.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I6713abd61c954ce12732902e5b3ca4d4c0b1563e
- Also made tiles refresh more efficient: when category changes, only
refresh dynamic tiles. Static tiles from xml will not change due to
category change.
Bug: 31799836
Test: RunSettingsRoboTests
Change-Id: I1e4c85f2c122c65ec99729e43a66c80acdd863c8