From c970f4d79c7f71ec20683e360b46321d34bc7389 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Tue, 20 Oct 2020 17:10:15 +0100 Subject: [PATCH] Stop search tests using location_settings Stop robolectric search tests using location_settings, use sound_settings instead. The choice of location_settings.xml seems arbitrary, and there's a commit coming which means one of the controllers doesn't just use settings to check availability. When the unconfigured mock returns null from a method, that causes the test to fail in a non-obvious way. Bug: 171371424 Test: m RunSettingsRoboTests Change-Id: I4d3386e3c62fb4151e4a4e27625edccec89316d9 --- .../src/com/android/settings/testutils/FakeIndexProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/robotests/src/com/android/settings/testutils/FakeIndexProvider.java b/tests/robotests/src/com/android/settings/testutils/FakeIndexProvider.java index c96155942b0..910ca54b177 100644 --- a/tests/robotests/src/com/android/settings/testutils/FakeIndexProvider.java +++ b/tests/robotests/src/com/android/settings/testutils/FakeIndexProvider.java @@ -30,7 +30,7 @@ public class FakeIndexProvider implements Indexable { public static final String KEY = "TestKey"; public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = - new BaseSearchIndexProvider(R.xml.location_settings) { + new BaseSearchIndexProvider(R.xml.sound_settings) { @Override public List getNonIndexableKeys(Context context) {