packages/apps/Settings
修订版 | a771c0e925565959173e67fa8478a8c45c0d7d8c (tree) |
---|---|
时间 | 2016-10-08 21:49:39 |
作者 | Steve Kondik <steve@cyng...> |
Commiter | Gerrit Code Review |
settings: Correctly index SwitchPreferences
Change-Id: I5a2b006823954055b0c3892e8b20ce9df6ca8803
@@ -161,6 +161,7 @@ public class Index { | ||
161 | 161 | private static final String NODE_NAME_PREFERENCE_SCREEN = "PreferenceScreen"; |
162 | 162 | private static final String NODE_NAME_CHECK_BOX_PREFERENCE = "CheckBoxPreference"; |
163 | 163 | private static final String NODE_NAME_LIST_PREFERENCE = "ListPreference"; |
164 | + private static final String NODE_NAME_SWITCH_PREFERENCE = "SwitchPreference"; | |
164 | 165 | |
165 | 166 | private static final List<String> EMPTY_LIST = Collections.<String>emptyList(); |
166 | 167 |
@@ -900,7 +901,8 @@ public class Index { | ||
900 | 901 | title = getDataTitle(context, attrs); |
901 | 902 | keywords = getDataKeywords(context, attrs); |
902 | 903 | |
903 | - if (!nodeName.equals(NODE_NAME_CHECK_BOX_PREFERENCE)) { | |
904 | + if (!nodeName.endsWith(NODE_NAME_CHECK_BOX_PREFERENCE) && | |
905 | + !nodeName.endsWith(NODE_NAME_SWITCH_PREFERENCE)) { | |
904 | 906 | summary = getDataSummary(context, attrs); |
905 | 907 | |
906 | 908 | String entries = null; |