Commit Graph

18 Commits

Author SHA1 Message Date
Bonian Chen
203f0fe89d [Settings] Code refactor - remove unused import lines
Remove some unused import lines within source code based on
https://source.android.com/setup/contribute/code-style

Bug: 182867979
Test: build pass
Change-Id: I76dbcfa9e5b435b2838401dfee15b12f472d07d0
2021-03-16 10:24:24 +00:00
Lorenzo Colitti
04d34ced59 Switch Settings from IConnectivityManager to VpnManager.
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
2021-02-08 16:50:25 +09:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
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
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Matthew Fritze
8f36eb8cfb Update airplane mode key to match framework constant
Change pref key for airplane mode to "airplane_mode" to match the
constant declared in SettingsSlicesContract.

Bug: 80106671
Test: robotests
Change-Id: I898befffbdafc3004fc127414edd04f60ff2554e
2018-05-22 18:51:11 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Doris Ling
0a66946d6b Use a different string for vpn summary.
- 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
2018-04-12 14:04:10 -07:00
Chalard Jean
42405603c7 Move the Private DNS dialog back to the top level.
Bug: 64133961
Fixes: 74844869
Test: visual test and interaction
      also updated tests and checked they pass
Change-Id: I7c8d50e5941c2a7dd46014932bdace14dc222c80
2018-04-02 09:58:12 +00:00
Fan Zhang
a7f135596d Switch to use ThreadUtils.postOnMainThread
Change-Id: I344d25a1a667de9c0b23d6d528d905b4da3a4c40
Fixes: 63896139
Test: rerun tests
2017-10-31 13:27:41 -07:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
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
2017-05-12 11:10:46 -07:00
Fan Zhang
50f82ac557 Update some strings to match spec
Change-Id: Iba242871fce9c9bca8fbbc5d3ad3f7948f35d3d0
Fix: 36234108
Test: make RunSettingsRoboTests
2017-03-16 09:59:42 -07:00
Fan Zhang
0ef0d5006d Display current vpn for Vpn preference summary text
Change-Id: Id9917a07e519d16e2000b4fa9888f783171e55f8
Fix: 34974598
Test: RunSettingsRoboTests
2017-02-13 13:22:48 -08:00
Fan Zhang
9b6f181340 Remove no-op handlePerferenceTreeClick from PrefControllers
Bug: 33429853
Test: RunSettingsRoboTests
Change-Id: I5633953e3d7b07f9006e541b96a24a2a769e2686
2016-12-07 15:34:31 -08:00
Robin Lee
8be8e626d2 Make Vpn.isAvailable return available, not unavailable
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
2016-11-02 16:34:41 +00:00
Fan Zhang
242da31179 Fix logging spam in DashboardFragment.
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
2016-10-25 17:14:47 -07:00
Fan Zhang
db1112a221 Add progressive disclsoure
- 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
2016-10-18 16:57:11 -07:00
Fan Zhang
7f1a4b5891 Add PreferenceControllers to Network page.
- 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
2016-10-12 15:04:39 -07:00