TrustAgentSettings use DashboardFragment

- Remove dummy preference from trust_agent_setting.xml.
- Build a controller to generate/manage a list of preferences.
- Move some logics to the controller and add tests.

Bug: 73899467
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.security
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.search
Test: atest SettingsGatewayTest UniquePreferenceTest
Change-Id: Ideae0c1e7311d7647cf522e01592822e565a0ff7
This commit is contained in:
Mill Chen
2018-04-13 03:59:19 +00:00
committed by Fan Zhang
parent 02aaca9529
commit fc64a6c8ad
9 changed files with 541 additions and 180 deletions

View File

@@ -14,11 +14,10 @@
limitations under the License.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="trust_agents"
android:title="@string/manage_trust_agents">
<!-- Needed so PreferenceGroupAdapter allows SwitchPreference to be
recycled. Removed in onResume -->
<SwitchPreference android:key="dummy_preference" />
android:title="@string/manage_trust_agents"
settings:controller="com.android.settings.security.trustagent.TrustAgentsPreferenceController">
</PreferenceScreen>