Code example for SearchRecentSuggestions

0
    private static Integer mode;
    private static String authority;
     
    private static SearchRecentSuggestions getSuggestions() {
        if (suggestions == null) {
            suggestions = new SearchRecentSuggestions(ConfigurationManager.getInstance().getContext(), authority, mode);
        } 
        return suggestions;
    } 
 
    public static void saveRecentQuery(String query, String line2) {
        try { 
            getSuggestions().saveRecentQuery(query, line2);
        } catch (Exception e) {
            LoggerUtils.error("SuggestionProviderUtil.saveRecentQuery() exception", e);
        } 
    } 
 
    public static void clearHistory() { 
        try { 
            getSuggestions().clearHistory();