Extending SearchFeatureProvider API to provide timeout

Bug: 38197948
Test: RunSettingsRoboTests

Change-Id: I5b04085ba93061dafe8977b42ebe5092bc9a9d09
This commit is contained in:
Soroosh Mariooryad
2017-08-08 11:21:32 -07:00
parent 0f5fadcb0e
commit 98fc9b139c
3 changed files with 11 additions and 4 deletions

View File

@@ -137,6 +137,13 @@ public interface SearchFeatureProvider {
return false;
}
/**
* @return smart ranking timeout in milliseconds.
*/
default long smartSearchRankingTimeoutMs(Context context) {
return 300L;
}
/**
* Prepare for search ranking predictions to avoid latency on the first prediction call.
*/