From 5b95f6384b0df203b4bf51e6c30701ecaa8dad28 Mon Sep 17 00:00:00 2001 From: Yanting Yang Date: Thu, 23 Mar 2023 18:04:48 +0800 Subject: [PATCH] Remove unnecessary indexes for Location services Remove the indexes from LocationServicesForWork since it is only used in the two tabs scenario. Should not provide its entry in Settings Search to launch it independently. Bug: 265056058 Test: manual Change-Id: I495c6e9c913acb1da3fd759f0d2e12fc7d935389 --- .../settings/location/LocationServicesForWork.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/com/android/settings/location/LocationServicesForWork.java b/src/com/android/settings/location/LocationServicesForWork.java index 29285ad6401..f61918e8b55 100644 --- a/src/com/android/settings/location/LocationServicesForWork.java +++ b/src/com/android/settings/location/LocationServicesForWork.java @@ -21,13 +21,13 @@ import android.content.Context; import com.android.settings.R; import com.android.settings.dashboard.DashboardFragment; -import com.android.settings.search.BaseSearchIndexProvider; -import com.android.settingslib.search.SearchIndexable; /** * A page that configures the Location Services settings for work profile. + * + * Note that this page should not provide indexes because it is only used in the two tabs + * {@link ProfileSelectFragment} scenario and should not be launched independently. */ -@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC) public class LocationServicesForWork extends DashboardFragment { private static final String TAG = "LocationServicesForWork"; @@ -51,10 +51,4 @@ public class LocationServicesForWork extends DashboardFragment { super.onAttach(context); use(LocationInjectedServicesForWorkPreferenceController.class).init(this); } - - /** - * For Search. - */ - public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = - new BaseSearchIndexProvider(R.xml.location_services_workprofile); }