Add optional feedback button for settings search

Adds mechanism for adding a button in the search screen
and stubs to show and hide the button.

Fixes: 35164702
Test: make -j40 RunSettingsRoboTests
Change-Id: I34d245e84b62cedf2dc6e5de4ea336c5a99ffd31
This commit is contained in:
Matthew Fritze
2017-02-21 10:20:40 -08:00
parent a540a978bc
commit 2beb03f4b7
11 changed files with 237 additions and 22 deletions

View File

@@ -19,6 +19,7 @@ import android.app.Activity;
import android.content.Context;
import android.view.Menu;
import android.view.View;
import com.android.settings.dashboard.SiteMapManager;
/**
@@ -68,4 +69,25 @@ public interface SearchFeatureProvider {
* Updates the Settings indexes
*/
void updateIndex(Context context);
/**
* Initializes the feedback button in case it was dismissed.
*/
default void initFeedbackButton() {
}
/**
* Show a button users can click to submit feedback on the quality of the search results.
*/
default void showFeedbackButton(SearchFragment fragment, View view) {
}
/**
* Hide the feedback button shown by
* {@link #showFeedbackButton(SearchFragment fragment, View view) showFeedbackButton}
*/
default void hideFeedbackButton() {
}
}