Search in sources :

Example 1 with SuggestionParser

use of com.android.settingslib.SuggestionParser in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class DashboardSummary method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    long startTime = System.currentTimeMillis();
    super.onCreate(savedInstanceState);
    List<DashboardCategory> categories = ((SettingsActivity) getActivity()).getDashboardCategories();
    mSummaryLoader = new SummaryLoader(getActivity(), categories);
    Context context = getContext();
    mConditionManager = ConditionManager.get(context, false);
    mSuggestionParser = new SuggestionParser(context, context.getSharedPreferences(SUGGESTIONS, 0), R.xml.suggestion_ordering);
    mSuggestionsChecks = new SuggestionsChecks(getContext());
    if (savedInstanceState == null) {
        mSuggestionsShownLogged = new ArrayList<>();
        mSuggestionsHiddenLogged = new ArrayList<>();
    } else {
        mSuggestionsShownLogged = savedInstanceState.getStringArrayList(EXTRA_SUGGESTION_SHOWN_LOGGED);
        mSuggestionsHiddenLogged = savedInstanceState.getStringArrayList(EXTRA_SUGGESTION_HIDDEN_LOGGED);
    }
    if (DEBUG_TIMING)
        Log.d(TAG, "onCreate took " + (System.currentTimeMillis() - startTime) + " ms");
    final Resources res = context.getResources();
    mNumColumns = res.getInteger(R.integer.dashboard_num_columns);
}
Also used : DashboardCategory(com.android.settingslib.drawer.DashboardCategory) Context(android.content.Context) SuggestionParser(com.android.settingslib.SuggestionParser) Resources(android.content.res.Resources) SettingsActivity(com.android.settings.SettingsActivity)

Aggregations

Context (android.content.Context)1 Resources (android.content.res.Resources)1 SettingsActivity (com.android.settings.SettingsActivity)1 SuggestionParser (com.android.settingslib.SuggestionParser)1 DashboardCategory (com.android.settingslib.drawer.DashboardCategory)1