use of com.android.settingslib.accounts.AuthenticatorHelper in project android_packages_apps_Settings by DirtyUnicorns.
the class AccountDetailDashboardFragment method updateUi.
@VisibleForTesting
void updateUi() {
final Context context = getContext();
UserHandle userHandle = null;
Bundle args = getArguments();
if (args != null && args.containsKey(KEY_USER_HANDLE)) {
userHandle = args.getParcelable(KEY_USER_HANDLE);
}
final AuthenticatorHelper helper = new AuthenticatorHelper(context, userHandle, null);
final AccountTypePreferenceLoader accountTypePreferenceLoader = new AccountTypePreferenceLoader(this, helper, userHandle);
PreferenceScreen prefs = accountTypePreferenceLoader.addPreferencesForType(mAccountType, getPreferenceScreen());
if (prefs != null) {
accountTypePreferenceLoader.updatePreferenceIntents(prefs, mAccountType, mAccount);
}
}
use of com.android.settingslib.accounts.AuthenticatorHelper in project android_packages_apps_Settings by DirtyUnicorns.
the class AccountSyncPreferenceController method init.
public void init(Account account, UserHandle userHandle) {
mAccount = account;
mUserHandle = userHandle;
mAuthenticatorHelper = new AuthenticatorHelper(mContext, mUserHandle, this);
}
use of com.android.settingslib.accounts.AuthenticatorHelper in project android_packages_apps_Settings by DirtyUnicorns.
the class AccountHeaderPreferenceController method onResume.
@Override
public void onResume() {
final AuthenticatorHelper helper = new AuthenticatorHelper(mContext, mUserHandle, null);
EntityHeaderController.newInstance(mActivity, mHost, mHeaderPreference.findViewById(R.id.entity_header)).setLabel(mAccount.name).setIcon(helper.getDrawableForType(mContext, mAccount.type)).done(mActivity, true);
}
use of com.android.settingslib.accounts.AuthenticatorHelper in project platform_packages_apps_Settings by BlissRoms.
the class AccountSyncPreferenceController method init.
public void init(Account account, UserHandle userHandle) {
mAccount = account;
mUserHandle = userHandle;
mAuthenticatorHelper = new AuthenticatorHelper(mContext, mUserHandle, this);
}
use of com.android.settingslib.accounts.AuthenticatorHelper in project platform_packages_apps_Settings by BlissRoms.
the class AccountPreferenceBase method onCreate.
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
mUm = (UserManager) getSystemService(Context.USER_SERVICE);
final Activity activity = getActivity();
mUserHandle = Utils.getSecureTargetUser(activity.getActivityToken(), mUm, getArguments(), activity.getIntent().getExtras());
mAuthenticatorHelper = new AuthenticatorHelper(activity, mUserHandle, this);
mAccountTypePreferenceLoader = new AccountTypePreferenceLoader(this, mAuthenticatorHelper, mUserHandle);
}
Aggregations