Commit 479a93fb authored by Boris Sazonov's avatar Boris Sazonov Committed by Commit Bot

[Signin][Android] Rename CoreAccountInfo.getName to getEmail

Follow-up to https://crrev.com/c/2027531.
Renames CoreAccountInfo.getName to getEmail to match the C++
CoreAccountInfo object.

Bug: None
Change-Id: Icbe98595e75ff8d1827dd780e31c1babc8efd6f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2027807
Commit-Queue: Boris Sazonov <bsazonov@chromium.org>
Reviewed-by: default avatarTanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736942}
parent eefcb753
......@@ -379,7 +379,7 @@ public class SigninManager
public void signIn(@SigninAccessPoint int accessPoint, CoreAccountInfo accountInfo,
@Nullable SignInCallback callback) {
assert accountInfo != null;
signIn(accessPoint, AccountManagerFacade.createAccountFromName(accountInfo.getName()),
signIn(accessPoint, AccountManagerFacade.createAccountFromName(accountInfo.getEmail()),
callback);
}
......@@ -480,7 +480,7 @@ public class SigninManager
// Cache the signed-in account name. This must be done after the native call, otherwise
// sync tries to start without being signed in natively and crashes.
ChromeSigninController.get().setSignedInAccountName(
mSignInState.mCoreAccountInfo.getName());
mSignInState.mCoreAccountInfo.getEmail());
enableSync(mSignInState.mCoreAccountInfo);
if (mSignInState.mCallback != null) {
......@@ -707,7 +707,7 @@ public class SigninManager
// Cache the signed-in account name. This must be done after the native call, otherwise
// sync tries to start without being signed in the native code and crashes.
mAndroidSyncSettings.updateAccount(
AccountManagerFacade.createAccountFromName(accountInfo.getName()));
AccountManagerFacade.createAccountFromName(accountInfo.getEmail()));
mAndroidSyncSettings.enableChromeSync();
}
......
......@@ -121,7 +121,7 @@ public class IdentityManagerIntegrationTest {
private void seedAccountTrackerService() {
AccountIdProvider provider = AccountIdProvider.getInstance();
String[] accountNames = {mTestAccount1.getName(), mTestAccount2.getName()};
String[] accountNames = {mTestAccount1.getEmail(), mTestAccount2.getEmail()};
String[] accountIds = {mTestAccount1.getGaiaId(), mTestAccount2.getGaiaId()};
IdentityServicesProvider.get().getAccountTrackerService().syncForceRefreshForTest(
accountIds, accountNames);
......
......@@ -107,7 +107,7 @@ public class SigninSignoutIntegrationTest {
assertSignedIn();
TestThreadUtils.runOnUiThreadBlocking(() -> {
Assert.assertEquals(account.name,
mSigninManager.getIdentityManager().getPrimaryAccountInfo().getName());
mSigninManager.getIdentityManager().getPrimaryAccountInfo().getEmail());
});
}
......
......@@ -50,7 +50,7 @@ public class CoreAccountInfo {
* Returns the email of the current account.
*/
@CalledByNative
public String getName() {
public String getEmail() {
return mEmail;
}
......@@ -64,7 +64,7 @@ public class CoreAccountInfo {
@Override
public String toString() {
return String.format("CoreAccountInfo{id[%s], name[%s]}", getId(), getName());
return String.format("CoreAccountInfo{id[%s], name[%s]}", getId(), getEmail());
}
@Override
......
......@@ -153,7 +153,7 @@ CoreAccountInfo ConvertFromJavaCoreAccountInfo(
account.gaia = base::android::ConvertJavaStringToUTF8(
signin::Java_CoreAccountInfo_getGaiaId(env, j_core_account_info));
account.email = base::android::ConvertJavaStringToUTF8(
signin::Java_CoreAccountInfo_getName(env, j_core_account_info));
signin::Java_CoreAccountInfo_getEmail(env, j_core_account_info));
return account;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment