Explicitly setAccount in the same way as setHasInternet.

Bug: 28141203

This frees adapter from updating account and internet internally, and
allows refreshData() be private.

Change-Id: I8ccb4311c48c66222ee19e2d01b1c4943acdb0ee
This commit is contained in:
Fan Zhang
2016-04-29 13:05:49 -07:00
parent fc63188c2c
commit 9502163f92
3 changed files with 28 additions and 16 deletions

View File

@@ -130,7 +130,8 @@ public final class SupportFragment extends InstrumentedFragment implements View.
@Override
public void onAccountsUpdated(Account[] accounts) {
// Account changed, update support items.
mSupportItemAdapter.refreshData();
mSupportItemAdapter.setAccount(
mSupportFeatureProvider.getSupportEligibleAccount(mActivity));
}
@Override