Home | History | Annotate | Download | only in mail

Lines Matching refs:account

26 import com.android.emailcommon.provider.Account;
40 public static Sender newInstance(Context context, Account account)
43 + account.mDisplayName);
46 private static Sender instantiateSender(Context context, String className, Account account)
53 c.getMethod("newInstance", Account.class, Context.class);
54 o = m.invoke(null, account, context);
57 "exception %s invoking method %s#newInstance(Account, Context) for %s",
58 e.toString(), className, account.mDisplayName));
59 throw new MessagingException("can not instantiate Sender for " + account.mDisplayName);
63 account.mDisplayName + ": " + className + " create incompatible object");
71 private static Sender findSender(Context context, int resourceId, Account account)
77 HostAuth sendAuth = account.getOrCreateHostAuthSend(context);
87 sender = instantiateSender(context, className, account);
100 * Get an instance of a mail sender for the given account. The account must be valid (i.e. has
104 * @param account the account of the sender.
106 * @throws MessagingException If the sender cannot be obtained or if the account is invalid.
108 public synchronized static Sender getInstance(Context context, Account account)
111 Sender sender = findSender(appContext, R.xml.senders_product, account);
113 sender = findSender(appContext, R.xml.senders, account);
116 throw new MessagingException("Cannot find sender for account " + account.mDisplayName);