Update Settings to use themed Context.getDrawable()

Explicit null theme is passed when using Resources.getDrawable() and
no theme is available, e.g. when using getResourcesForApplication().
This fixes an issue with ic_text_dot theming and helps avoid similar
issues in the future.

BUG: 17648301
Change-Id: I3e97c3490b6f2a55744f567b21284f2935ae9af7
This commit is contained in:
Alan Viverette
2014-10-10 10:58:58 -07:00
parent 9062532960
commit 0ba89bd54c
16 changed files with 19 additions and 18 deletions

View File

@@ -216,7 +216,7 @@ public class ChooseAccountActivity extends PreferenceActivity {
AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType);
Context authContext = createPackageContextAsUser(desc.packageName, 0, mUserHandle);
icon = getPackageManager().getUserBadgedIcon(
authContext.getResources().getDrawable(desc.iconId), mUserHandle);
authContext.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);