Settings: Show user's Google avatar on the homepage

Change-Id: I16f3e241d2d2a4a25977fe7428687b88c8fde0c6
Signed-off-by: Jason Edson <jaysonedson@gmail.com>
This commit is contained in:
Jason Edson
2021-10-14 12:16:29 -07:00
committed by Joey
parent 7b671a55e2
commit 71a05be971
3 changed files with 11 additions and 8 deletions

View File

@@ -4,14 +4,17 @@ import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Context;
import com.android.settings.R;
import com.android.settings.overlay.FeatureFactory;
public class AccountFeatureProviderImpl implements AccountFeatureProvider {
@Override
public String getAccountType() {
return "com.google";
return FeatureFactory.getAppContext().getString(R.string.account_type);
}
@Override
public Account[] getAccounts(Context context) {
return AccountManager.get(context).getAccountsByType("com.google");
return AccountManager.get(context).getAccountsByType(getAccountType());
}
}