Use correct API for badging

Bug: 17414778
Change-Id: Ieb9890751c3071088b9f5aab48053e767f78bfe5
This commit is contained in:
Amith Yamasani
2014-09-07 15:38:09 -07:00
parent b5cc01342e
commit 30c50b15d0
4 changed files with 8 additions and 9 deletions

View File

@@ -215,8 +215,8 @@ public class ChooseAccountActivity extends PreferenceActivity {
try {
AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType);
Context authContext = createPackageContextAsUser(desc.packageName, 0, mUserHandle);
icon = getPackageManager().getUserBadgedDrawableForDensity(
authContext.getResources().getDrawable(desc.iconId), mUserHandle, null, 0);
icon = getPackageManager().getUserBadgedIcon(
authContext.getResources().getDrawable(desc.iconId), mUserHandle);
} catch (PackageManager.NameNotFoundException e) {
// TODO: place holder icon for missing account icons?
Log.w(TAG, "No icon name for account type " + accountType);