Commit 7176bc33 authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Android][IdentityDisc] Small refactoring for IdentityDiscController

This CL is a small refactoring of the class IdentityDiscController.

Bug: 1127886
Change-Id: I00cca9a945c5fab454a4b0c4678173b9874ff57e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410490
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807911}
parent 989fc8a8
...@@ -165,9 +165,7 @@ public class IdentityDiscController implements NativeInitObserver, ProfileDataCa ...@@ -165,9 +165,7 @@ public class IdentityDiscController implements NativeInitObserver, ProfileDataCa
} }
String email = CoreAccountInfo.getEmailFrom(getSyncAccountInfo()); String email = CoreAccountInfo.getEmailFrom(getSyncAccountInfo());
boolean canShowIdentityDisc = email != null; mState = email == null ? IdentityDiscState.NONE : IdentityDiscState.SMALL;
mState = !canShowIdentityDisc ? IdentityDiscState.NONE : IdentityDiscState.SMALL;
ensureProfileDataCache(email, mState); ensureProfileDataCache(email, mState);
if (mState != IdentityDiscState.NONE) { if (mState != IdentityDiscState.NONE) {
......
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