Merge "Fix Settings search result 'add an account' does nothing."
This commit is contained in:
@@ -7334,7 +7334,7 @@
|
||||
<string name="keywords_sounds_and_notifications_interruptions">dont don\u2019t disturb, interrupt, interruption, break</string>
|
||||
<string name="keywords_app">RAM</string>
|
||||
<string name="keywords_location">nearby, location, history, reporting, GPS</string>
|
||||
<string name="keywords_accounts">account</string>
|
||||
<string name="keywords_accounts">account, add an account, work profile</string>
|
||||
<string name="keywords_users">restriction, restrict, restricted</string>
|
||||
<string name="keywords_keyboard_and_ime">text correction, correct, sound, vibrate, auto, language, gesture, suggest, suggestion, theme, offensive, word, type, emoji, international</string>
|
||||
<string name="keywords_reset_apps">reset, preferences, default</string>
|
||||
@@ -7430,9 +7430,6 @@
|
||||
<!-- Battery Saver: Search terms for battery saver schedule preference. Feel free to add additional terms when translating if appropriate [CHAR_LIMIT=NONE] -->
|
||||
<string name="keywords_battery_saver_schedule">routine, schedule, battery saver, power saver, battery, automatic, percent</string>
|
||||
|
||||
<!-- List of synonyms for the Add an account setting [CHAR_LIMIT=NONE] -->
|
||||
<string name="keywords_add_an_account">work profile</string>
|
||||
|
||||
<!-- Option title for the default sound, context based on screen -->
|
||||
<string name="default_sound">Default sound</string>
|
||||
|
||||
|
||||
@@ -19,5 +19,4 @@
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="add_account_screen"
|
||||
android:title="@string/header_add_an_account"
|
||||
settings:controller="com.android.settings.accounts.ChooseAccountPreferenceController"
|
||||
settings:keywords="@string/keywords_add_an_account"/>
|
||||
settings:controller="com.android.settings.accounts.ChooseAccountPreferenceController"/>
|
||||
|
||||
@@ -20,15 +20,11 @@ import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.search.Indexable;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -36,7 +32,6 @@ import java.util.List;
|
||||
/**
|
||||
* Activity asking a user to select an account to be set up.
|
||||
*/
|
||||
@SearchIndexable
|
||||
public class ChooseAccountFragment extends DashboardFragment {
|
||||
|
||||
private static final String TAG = "ChooseAccountFragment";
|
||||
@@ -84,24 +79,4 @@ public class ChooseAccountFragment extends DashboardFragment {
|
||||
controllers.add(new EnterpriseDisclosurePreferenceController(context));
|
||||
return controllers;
|
||||
}
|
||||
|
||||
public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
@Override
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
||||
boolean enabled) {
|
||||
final ArrayList<SearchIndexableResource> result = new ArrayList<>();
|
||||
|
||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||
sir.xmlResId = R.xml.add_account_settings;
|
||||
result.add(sir);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(
|
||||
Context context) {
|
||||
return buildControllers(context);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user