Make the fragment title can’t searchable
we shouldn't take users so deep into the settings IA because it's easy to feel lost in settings after clicking on a result without additional context. Bug: 143055215 Test: robotest & manual Change-Id: I337cb5ead31e1e4e7bf9be78132e90630f83ee43
This commit is contained in:
@@ -17,17 +17,12 @@ package com.android.settings.connecteddevice;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexableRaw;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This fragment contains previously connected device
|
||||
*/
|
||||
@@ -67,22 +62,5 @@ public class PreviouslyConnectedDeviceDashboardFragment extends DashboardFragmen
|
||||
* For Search.
|
||||
*/
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
@Override
|
||||
public List<SearchIndexableRaw> getRawDataToIndex(
|
||||
Context context, boolean enabled) {
|
||||
final List<SearchIndexableRaw> result = new ArrayList<SearchIndexableRaw>();
|
||||
final Resources res = context.getResources();
|
||||
|
||||
// Add fragment title
|
||||
SearchIndexableRaw data = new SearchIndexableRaw(context);
|
||||
data.key = KEY_PREVIOUSLY_CONNECTED_DEVICES;
|
||||
data.title = res.getString(
|
||||
R.string.connected_device_previously_connected_title);
|
||||
data.screenTitle = res.getString(
|
||||
R.string.connected_device_previously_connected_title);
|
||||
result.add(data);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
new BaseSearchIndexProvider(R.xml.previously_connected_devices);
|
||||
}
|
Reference in New Issue
Block a user