Merge "Fix issue for new account not being shown in work profile."

This commit is contained in:
TreeHugger Robot
2017-05-18 18:55:24 +00:00
committed by Android (Google) Code Review
2 changed files with 41 additions and 0 deletions

View File

@@ -299,6 +299,11 @@ public class AccountPreferenceController extends PreferenceController
final ProfileData data = mProfiles.get(userInfo.id);
if (data != null) {
data.pendingRemoval = false;
if (userInfo.isEnabled()) {
// recreate the authentication helper to refresh the list of enabled accounts
data.authenticatorHelper =
new AuthenticatorHelper(mContext, userInfo.getUserHandle(), this);
}
return;
}
final Context context = mContext;