Add estimate time under support options.

Bug: 28141203

- SupportFeatureProvider will provide a localized estimate string.
- Use a builder pattern to instantiate SupportData to avoid increasing
  constructor args.

Change-Id: I92e90cd57b4ef4e1d921f403801cfd5984ef6a3b
This commit is contained in:
Fan Zhang
2016-05-02 17:25:05 -07:00
parent 1529a875db
commit be61a14fcd
4 changed files with 174 additions and 45 deletions

View File

@@ -52,6 +52,11 @@ public interface SupportFeatureProvider {
*/
boolean isSupportTypeEnabled(Context context, @SupportType int type);
/**
* Returns a localized string indicating estimated wait time for a support time.
*/
String getEstimatedWaitTime(Context context, @SupportType int type);
/**
* Returns an {@link Account} that's eligible for support options.
*/
@@ -61,7 +66,7 @@ public interface SupportFeatureProvider {
* Returns an {@link Intent} that opens email support for specified account.
*
* @param context A UI Context
* @param account A account returned by {@link #getSupportEligibleAccounts}
* @param account A account returned by {@link #getSupportEligibleAccount}
* @param type The type of support account needs.
*/
Intent getSupportIntent(Context context, Account account, @SupportType int type);