This includes 3 fixes: Adds missing settings:controller attribute for bold & high-contrast text preferences. Separates VibrationSettings into two fragments, one per fragment XML resource. Instead of using a conditional to choose the XML resource ID, we now use the conditional to choose which fragment to launch. This allows both fragment's preference controllers to be inspected by CodeInspectionTest#runSliceControllerInXmlInspection. Also updates the preference keys which must be unique per XML in order to appear in Settings Search. Adds Magnification preference controllers to exempt-not-in-XML list. These controllers are for fragments that are not declared in an XML. See ToggleScreenMagnificationPreferenceFragment #getPreferenceScreenResId. Bug: 289967175 Test: atest SettingsRoboTests:com.android.settings.accessibility Test: atest CodeInspectionTest#runSliceControllerInXmlInspection; Observe no errors in the accessibility package. Test: Open Settings > Accessibility > Vibration & haptics; observe vibration intensity page is shown (behavior unchanged). Hardcode config_vibration_supported_intensity_levels=1; observe vibration page with toggles is shown (behavior unchanged). Change-Id: I257b5ad390371bedb1623af6289016b06d478707
83 lines
3.7 KiB
XML
83 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2018 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<PreferenceScreen
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:title="@string/accessibility_vibration_settings_title">
|
|
|
|
<com.android.settingslib.widget.MainSwitchPreference
|
|
android:key="vibration_switch_main"
|
|
android:title="@string/accessibility_vibration_primary_switch_title"
|
|
app:keywords="@string/keywords_accessibility_vibration_primary_switch"
|
|
app:controller="com.android.settings.accessibility.VibrationMainSwitchPreferenceController"/>
|
|
|
|
<PreferenceCategory
|
|
android:key="vibration_category_call"
|
|
android:title="@string/accessibility_call_vibration_category_title">
|
|
|
|
<SwitchPreference
|
|
android:key="vibration_preference_ring"
|
|
android:title="@string/accessibility_ring_vibration_title"
|
|
app:keywords="@string/keywords_ring_vibration"
|
|
app:controller="com.android.settings.accessibility.RingVibrationTogglePreferenceController" />
|
|
|
|
<SwitchPreference
|
|
android:key="vibration_preference_ramping_ringer"
|
|
android:title="@string/vibrate_when_ringing_option_ramping_ringer"
|
|
app:keywords="@string/keywords_ramping_ringer_vibration"
|
|
app:controller="com.android.settings.accessibility.VibrationRampingRingerTogglePreferenceController"/>
|
|
|
|
</PreferenceCategory>
|
|
|
|
<PreferenceCategory
|
|
android:key="vibration_category_notification_alarm"
|
|
android:title="@string/accessibility_notification_alarm_vibration_category_title">
|
|
|
|
<SwitchPreference
|
|
android:key="vibration_preference_notification"
|
|
android:title="@string/accessibility_notification_vibration_title"
|
|
app:keywords="@string/keywords_notification_vibration"
|
|
app:controller="com.android.settings.accessibility.NotificationVibrationTogglePreferenceController" />
|
|
|
|
<SwitchPreference
|
|
android:key="vibration_preference_alarm"
|
|
android:title="@string/accessibility_alarm_vibration_title"
|
|
app:keywords="@string/keywords_alarm_vibration"
|
|
app:controller="com.android.settings.accessibility.AlarmVibrationTogglePreferenceController" />
|
|
|
|
</PreferenceCategory>
|
|
|
|
<PreferenceCategory
|
|
android:key="vibration_category_haptics"
|
|
android:title="@string/accessibility_interactive_haptics_category_title">
|
|
|
|
<SwitchPreference
|
|
android:key="vibration_preference_touch"
|
|
android:title="@string/accessibility_touch_vibration_title"
|
|
app:keywords="@string/keywords_touch_vibration"
|
|
app:controller="com.android.settings.accessibility.HapticFeedbackTogglePreferenceController" />
|
|
|
|
<SwitchPreference
|
|
android:key="vibration_preference_media"
|
|
android:title="@string/accessibility_media_vibration_title"
|
|
app:keywords="@string/keywords_media_vibration"
|
|
app:controller="com.android.settings.accessibility.MediaVibrationTogglePreferenceController" />
|
|
|
|
</PreferenceCategory>
|
|
|
|
</PreferenceScreen>
|