From 007d1b2a57318a14fb2d5828d03ba72c3e567e51 Mon Sep 17 00:00:00 2001 From: Yanting Yang Date: Thu, 1 Jul 2021 20:15:44 +0800 Subject: [PATCH] Remove stale search result about "Recent location requests" page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on the new design, RecentLocationRequestSeeAllFragment was no longer used on Location, but it still implemented the indexable interface to provide stale search result “Recent location requests” to Settings Search. Remove the indexable interface from RecentLocationRequestSeeAllFragment as a quick fix and also correct the related test method name. Fixes: 192542283 Test: visual Change-Id: I1a3df5d7319b8831db2f3d3abba19a11b5a83c81 --- .../RecentLocationRequestSeeAllFragment.java | 12 ++---------- .../settings/search/CustomSiteMapRegistryTest.java | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java b/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java index 3f0defd1ac6..7fd66435c7a 100644 --- a/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java +++ b/src/com/android/settings/location/RecentLocationRequestSeeAllFragment.java @@ -24,11 +24,9 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.settings.R; import com.android.settings.dashboard.DashboardFragment; import com.android.settings.dashboard.profileselector.ProfileSelectFragment; -import com.android.settings.search.BaseSearchIndexProvider; -import com.android.settingslib.search.SearchIndexable; -/** Dashboard Fragment to display all recent location requests, sorted by recency. */ -@SearchIndexable +/** @deprecated Use {@link RecentLocationAccessSeeAllFragment} instead. */ +@Deprecated public class RecentLocationRequestSeeAllFragment extends DashboardFragment { private static final String TAG = "RecentLocationReqAll"; public static final String PATH = @@ -99,10 +97,4 @@ public class RecentLocationRequestSeeAllFragment extends DashboardFragment { R.string.menu_hide_system); updateMenu(); } - - /** - * For Search. - */ - public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = - new BaseSearchIndexProvider(R.xml.location_recent_requests_see_all); } diff --git a/tests/unit/src/com/android/settings/search/CustomSiteMapRegistryTest.java b/tests/unit/src/com/android/settings/search/CustomSiteMapRegistryTest.java index 3848fe446b0..5eb3b336ede 100644 --- a/tests/unit/src/com/android/settings/search/CustomSiteMapRegistryTest.java +++ b/tests/unit/src/com/android/settings/search/CustomSiteMapRegistryTest.java @@ -62,7 +62,7 @@ public class CustomSiteMapRegistryTest { } @Test - public void shouldContainRecentLocationRequestSeeAllFragmentPairs() { + public void shouldContainRecentLocationAccessSeeAllFragmentPairs() { assertThat(CustomSiteMapRegistry.CUSTOM_SITE_MAP.get( RecentLocationAccessSeeAllFragment.class.getName())).isEqualTo( LocationSettings.class.getName());