summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorAlexandra Gherghina <alexgherghina@google.com>2014-06-30 18:07:52 +0100
committerAlexandra Gherghina <alexgherghina@google.com>2014-06-30 18:10:56 +0100
commitce0b22cf90cf99377f63b1aa4d4720f69a6edd7b (patch)
tree4b605e86a66a01514d8c7bd22375f8e9f34ab1d7 /src/com/android
parent1eb3f316bd20c5d3e816876229c05bcf9f0c712c (diff)
downloadpackages_apps_Settings-ce0b22cf90cf99377f63b1aa4d4720f69a6edd7b.zip
packages_apps_Settings-ce0b22cf90cf99377f63b1aa4d4720f69a6edd7b.tar.gz
packages_apps_Settings-ce0b22cf90cf99377f63b1aa4d4720f69a6edd7b.tar.bz2
Retrieve resources from the corresponding profile
This handles the case where the authenticator does not exist in the primary profile. Bug: 15466880 Change-Id: I9f6311397456b8bf210f50df82b6be605c1140f0
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/settings/accounts/AuthenticatorHelper.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/settings/accounts/AuthenticatorHelper.java b/src/com/android/settings/accounts/AuthenticatorHelper.java
index 0ecf438..8633bd3 100644
--- a/src/com/android/settings/accounts/AuthenticatorHelper.java
+++ b/src/com/android/settings/accounts/AuthenticatorHelper.java
@@ -102,7 +102,8 @@ final public class AuthenticatorHelper extends BroadcastReceiver {
if (mTypeToAuthDescription.containsKey(accountType)) {
try {
AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType);
- Context authContext = context.createPackageContext(desc.packageName, 0);
+ Context authContext = context.createPackageContextAsUser(desc.packageName, 0,
+ mUserHandle);
icon = mUm.getBadgedDrawableForUser(
authContext.getResources().getDrawable(desc.iconId), mUserHandle);
synchronized (mAccTypeIconCache) {
@@ -128,7 +129,8 @@ final public class AuthenticatorHelper extends BroadcastReceiver {
if (mTypeToAuthDescription.containsKey(accountType)) {
try {
AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType);
- Context authContext = context.createPackageContext(desc.packageName, 0);
+ Context authContext = context.createPackageContextAsUser(desc.packageName, 0,
+ mUserHandle);
label = authContext.getResources().getText(desc.labelId);
} catch (PackageManager.NameNotFoundException e) {
Log.w(TAG, "No label name for account type " + accountType);