package com.github.mobile.android.repo;

import android.content.Context;
import android.content.SearchRecentSuggestionsProvider;
import android.provider.SearchRecentSuggestions;

public class RepoSearchRecentSuggestionsProvider extends SearchRecentSuggestionsProvider {
    public final static String AUTHORITY = "com.github.search.suggest.recent.repos";
    public final static int MODE = DATABASE_MODE_QUERIES;

    public static void saveRecentRepoQuery(Context context, String query) {
        suggestions(context).saveRecentQuery(query, null);
    }

    public static void clearRepoQueryHistory(Context context) {
        suggestions(context).clearHistory();
    }

    private static SearchRecentSuggestions suggestions(Context context) {
        return new SearchRecentSuggestions(context, AUTHORITY, MODE);
    }


    public RepoSearchRecentSuggestionsProvider() {
        setupSuggestions(AUTHORITY, MODE);
    }
}
@@ -172,16 +172,93 @@
 tions;%0A%0A
+/**%0A * Suggestions provider for recently searched for repository queries%0A */%0A
 public c
@@ -340,26 +340,28 @@
 vider %7B%0A
+%0A
     p
-ublic
+rivate
  final s
@@ -427,26 +427,28 @@
 repos%22;%0A
+%0A
     p
-ublic
+rivate
  final s
@@ -488,16 +488,110 @@
 ERIES;%0A%0A
+    /**%0A     * Save query to history%0A     *%0A     * @param context%0A     * @param query%0A     */%0A
     publ
@@ -720,24 +720,96 @@
 ll);%0A    %7D%0A%0A
+    /**%0A     * Clear query history%0A     *%0A     * @param context%0A     */%0A
     public s
@@ -1063,16 +1063,102 @@
 %0A    %7D%0A%0A
+    /**%0A     * Create suggestions provider for searched for repository queries%0A     */
 %0A    pub

Document RepoSearchRecentSuggestionsProvider class