By default select current country in support phone list.

Bug: 29105266
Change-Id: I78027e5c817aae5e2220bc974e03282d937c33c6
This commit is contained in:
Fan Zhang
2016-06-27 14:58:34 -07:00
parent 2736ace057
commit 46da9be509
2 changed files with 6 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ public final class SupportItemAdapter extends RecyclerView.Adapter<SupportItemAd
// Optimistically assume we have Internet access. It will be updated later to correct value. // Optimistically assume we have Internet access. It will be updated later to correct value.
mHasInternet = true; mHasInternet = true;
setAccount(mSupportFeatureProvider.getSupportEligibleAccount(mActivity)); setAccount(mSupportFeatureProvider.getSupportEligibleAccount(mActivity));
mSelectedCountry = mSupportFeatureProvider.getCurrentCountryCodeIfHasConfig(PHONE);
refreshData(); refreshData();
} }

View File

@@ -62,6 +62,11 @@ public interface SupportFeatureProvider {
*/ */
boolean isOperatingNow(@SupportType int type); boolean isOperatingNow(@SupportType int type);
/**
* Returns the current country code if it has a operation config, otherwise returns null.
*/
String getCurrentCountryCodeIfHasConfig(@SupportType int type);
/** /**
* Returns localized string for operation hours in specified country. If country is null, use * Returns localized string for operation hours in specified country. If country is null, use
* current country to figure out operation hours. * current country to figure out operation hours.