Fix UniquePreferenceTest
Bug: 70638967 Test: atest UniquePreferenceTest Change-Id: Idf06ccd9580d66c051f9b7c910c567f321da6cc5
This commit is contained in:
@@ -77,6 +77,6 @@
|
|||||||
android:summary="@string/zen_mode_screen_off_summary" />
|
android:summary="@string/zen_mode_screen_off_summary" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<com.android.settingslib.widget.FooterPreference/>
|
<com.android.settingslib.widget.FooterPreference />
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -41,8 +41,9 @@
|
|||||||
android:layout="@layout/zen_mode_settings_button" />
|
android:layout="@layout/zen_mode_settings_button" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory>
|
<PreferenceCategory
|
||||||
<com.android.settingslib.widget.FooterPreference/>
|
android:key="zen_mode_footer_container">
|
||||||
|
<com.android.settingslib.widget.FooterPreference />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -54,6 +54,8 @@ import java.util.Set;
|
|||||||
public class UniquePreferenceTest {
|
public class UniquePreferenceTest {
|
||||||
|
|
||||||
private static final String TAG = "UniquePreferenceTest";
|
private static final String TAG = "UniquePreferenceTest";
|
||||||
|
private static final List<String> IGNORE_PREF_TYPES = Arrays.asList(
|
||||||
|
"com.android.settingslib.widget.FooterPreference");
|
||||||
private static final List<String> SUPPORTED_PREF_TYPES = Arrays.asList(
|
private static final List<String> SUPPORTED_PREF_TYPES = Arrays.asList(
|
||||||
"Preference", "PreferenceCategory", "PreferenceScreen");
|
"Preference", "PreferenceCategory", "PreferenceScreen");
|
||||||
private static final List<String> WHITELISTED_DUPLICATE_KEYS = Arrays.asList(
|
private static final List<String> WHITELISTED_DUPLICATE_KEYS = Arrays.asList(
|
||||||
@@ -63,8 +65,15 @@ public class UniquePreferenceTest {
|
|||||||
// should be formed as one single xml and this entry
|
// should be formed as one single xml and this entry
|
||||||
// should be removed.
|
// should be removed.
|
||||||
|
|
||||||
"dashboard_tile_placeholder" // This is the placeholder pref for injecting dynamic
|
"dashboard_tile_placeholder", // This is the placeholder pref for injecting dynamic
|
||||||
// tiles.
|
// tiles.
|
||||||
|
// Dup keys from connected device page experiment.
|
||||||
|
"usb_mode",
|
||||||
|
"connected_devices_screen",
|
||||||
|
"toggle_bluetooth",
|
||||||
|
"toggle_nfc",
|
||||||
|
"android_beam_settings",
|
||||||
|
"sms_mirroring"
|
||||||
);
|
);
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
@@ -158,6 +167,9 @@ public class UniquePreferenceTest {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
final String nodeName = parser.getName();
|
final String nodeName = parser.getName();
|
||||||
|
if (IGNORE_PREF_TYPES.contains(nodeName)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!SUPPORTED_PREF_TYPES.contains(nodeName) && !nodeName.endsWith("Preference")) {
|
if (!SUPPORTED_PREF_TYPES.contains(nodeName) && !nodeName.endsWith("Preference")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user