Handle GB->ICS upgrade of POP3 accounts properly
* Heh. * We were using the login from the HostAuth in creating the Account Manager account, but it should be the email address from the Account itself; in IMAP (and usually in POP3) these are the same * But not for juno.com! * Updated unit test coming in another CL (tests are broken in a strange way, and the bug is FAST-blocker) Bug: 5110013 Change-Id: Id11799e8b30a0420804f00c2d2f265e44e39c4c0
This commit is contained in:
parent
6be8cceadd
commit
20b511ff68
|
@ -2442,15 +2442,14 @@ outer:
|
|||
*/
|
||||
|
||||
private static final String[] V21_ACCOUNT_PROJECTION =
|
||||
new String[] {AccountColumns.HOST_AUTH_KEY_RECV, AccountColumns.DISPLAY_NAME};
|
||||
new String[] {AccountColumns.HOST_AUTH_KEY_RECV, AccountColumns.EMAIL_ADDRESS};
|
||||
private static final int V21_ACCOUNT_RECV = 0;
|
||||
private static final int V21_ACCOUNT_NAME = 1;
|
||||
private static final int V21_ACCOUNT_EMAIL = 1;
|
||||
|
||||
private static final String[] V21_HOSTAUTH_PROJECTION =
|
||||
new String[] {HostAuthColumns.PROTOCOL, HostAuthColumns.LOGIN, HostAuthColumns.PASSWORD};
|
||||
new String[] {HostAuthColumns.PROTOCOL, HostAuthColumns.PASSWORD};
|
||||
private static final int V21_HOSTAUTH_PROTOCOL = 0;
|
||||
private static final int V21_HOSTAUTH_LOGIN = 1;
|
||||
private static final int V21_HOSTAUTH_PASSWORD = 2;
|
||||
private static final int V21_HOSTAUTH_PASSWORD = 1;
|
||||
|
||||
static private void createAccountManagerAccount(Context context, String login,
|
||||
String password) {
|
||||
|
@ -2486,10 +2485,11 @@ outer:
|
|||
HostAuth.SCHEME_POP3.equals(protocol)) {
|
||||
if (Email.DEBUG) {
|
||||
Log.d(TAG, "Create AccountManager account for " + protocol +
|
||||
"account: " + accountCursor.getString(V21_ACCOUNT_NAME));
|
||||
"account: " +
|
||||
accountCursor.getString(V21_ACCOUNT_EMAIL));
|
||||
}
|
||||
createAccountManagerAccount(accountManagerContext,
|
||||
hostAuthCursor.getString(V21_HOSTAUTH_LOGIN),
|
||||
accountCursor.getString(V21_ACCOUNT_EMAIL),
|
||||
hostAuthCursor.getString(V21_HOSTAUTH_PASSWORD));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue