Set preference unselectable using the DividerPreference.

In this way, when talking back is on, device won't speaking "Double
tap to activate" for no-action perference. The preference will have
divider line but lose ripple animation.

Bug: 31051833
Test: Manual Test. Cannot find a way to test it in testing framework.
1. Turn on the talk back.
2. Go to "About phone" Settings.
3. Tap and listen.

Change-Id: I2066d574e14071408c5a1db85a3bd4dafd8429fe
This commit is contained in:
jackqdyulei
2016-08-31 14:17:26 -07:00
parent 727186bd33
commit 64e00da860

View File

@@ -15,6 +15,7 @@
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/about_settings">
<!-- System update settings - launches activity -->
@@ -70,11 +71,15 @@
</PreferenceScreen>
<!-- Device hardware model -->
<Preference android:key="device_model"
<com.android.settings.DividerPreference
android:key="device_model"
android:enabled="false"
android:shouldDisableView="false"
android:selectable="false"
android:title="@string/model_info"
android:summary="@string/device_info_default"/>
android:summary="@string/device_info_default"
settings:allowDividerAbove="true"
settings:allowDividerBelow="true"/>
<!-- Device firmware version -->
<Preference android:key="firmware_version"
@@ -92,25 +97,37 @@
</PreferenceScreen>
<!-- Device FCC equipment id -->
<Preference android:key="fcc_equipment_id"
<com.android.settings.DividerPreference
android:key="fcc_equipment_id"
android:enabled="false"
android:shouldDisableView="false"
android:selectable="false"
android:title="@string/fcc_equipment_id"
android:summary="@string/device_info_default"/>
android:summary="@string/device_info_default"
settings:allowDividerAbove="true"
settings:allowDividerBelow="true"/>
<!-- Device Baseband version -->
<Preference android:key="baseband_version"
<com.android.settings.DividerPreference
android:key="baseband_version"
android:enabled="false"
android:shouldDisableView="false"
android:selectable="false"
android:title="@string/baseband_version"
android:summary="@string/device_info_default"/>
android:summary="@string/device_info_default"
settings:allowDividerAbove="true"
settings:allowDividerBelow="true"/>
<!-- Device Kernel version -->
<Preference android:key="kernel_version"
<com.android.settings.DividerPreference
android:key="kernel_version"
android:enabled="false"
android:shouldDisableView="false"
android:selectable="false"
android:title="@string/kernel_version"
android:summary="@string/device_info_default"/>
android:summary="@string/device_info_default"
settings:allowDividerAbove="true"
settings:allowDividerBelow="true"/>
<!-- Detailed build version -->
<Preference android:key="build_number"
@@ -120,10 +137,14 @@
android:summary="@string/device_info_default"/>
<!-- SELinux status information -->
<Preference android:key="selinux_status"
<com.android.settings.DividerPreference
android:key="selinux_status"
android:enabled="false"
android:shouldDisableView="false"
android:selectable="false"
android:title="@string/selinux_status"
android:summary="@string/selinux_status_enforcing"/>
android:summary="@string/selinux_status_enforcing"
settings:allowDividerAbove="true"
settings:allowDividerBelow="true"/>
</PreferenceScreen>