Handle managing accounts for a managed profile

Bug: 15466880
Change-Id: Icf0e06c954269426b500f0e5fbcdf3346c59eb9d
This commit is contained in:
Alexandra Gherghina
2014-07-01 15:05:17 +01:00
parent b8fff27ce3
commit 7c81c1d1af
2 changed files with 69 additions and 24 deletions

View File

@@ -138,7 +138,8 @@ class AccountPreferenceBase extends SettingsPreferenceFragment
public ArrayList<String> getAuthoritiesForAccountType(String type) {
if (mAccountTypeToAuthorities == null) {
mAccountTypeToAuthorities = Maps.newHashMap();
SyncAdapterType[] syncAdapters = ContentResolver.getSyncAdapterTypes();
SyncAdapterType[] syncAdapters = ContentResolver.getSyncAdapterTypesAsUser(
mUserHandle.getIdentifier());
for (int i = 0, n = syncAdapters.length; i < n; i++) {
final SyncAdapterType sa = syncAdapters[i];
ArrayList<String> authorities = mAccountTypeToAuthorities.get(sa.accountType);