Update Settings due to API changes.

bug:17390424

Change-Id: I25dfa40cc5109260d48dbe5f33274b162912d059
This commit is contained in:
Svetoslav
2014-09-04 16:51:43 -07:00
parent 0535ed559e
commit 39f82a7c98
4 changed files with 8 additions and 9 deletions

View File

@@ -18,7 +18,6 @@ package com.android.settings.accounts;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorDescription;
import android.app.ActivityManagerNative;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -216,8 +215,8 @@ public class ChooseAccountActivity extends PreferenceActivity {
try {
AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType);
Context authContext = createPackageContextAsUser(desc.packageName, 0, mUserHandle);
icon = mUm.getBadgedDrawableForUser(
authContext.getResources().getDrawable(desc.iconId), mUserHandle);
icon = getPackageManager().getUserBadgedDrawableForDensity(
authContext.getResources().getDrawable(desc.iconId), mUserHandle, null, 0);
} catch (PackageManager.NameNotFoundException e) {
// TODO: place holder icon for missing account icons?
Log.w(TAG, "No icon name for account type " + accountType);