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);
}
Aggregations