Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan Perera committed Dec 22, 2017
1 parent c28a29a commit 22feb3e
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,16 @@ protected void onCreate(Bundle savedInstanceState) {
etPassword.setFocusable(true);
etPassword.requestFocus();
String tenantedUserName = Preference.getString(context, Constants.USERNAME);
int tenantSeparator = tenantedUserName.lastIndexOf('@');
etUsername.setText(tenantedUserName.substring(0, tenantSeparator));
etDomain.setText(tenantedUserName.substring(tenantSeparator + 1, tenantedUserName.length()));
String nameAndDomain[] = tenantedUserName.split("@");
if (nameAndDomain.length == 3) {
etUsername.setText(nameAndDomain[0] + "@" + nameAndDomain[1]);
etDomain.setText(nameAndDomain[2]);
} else if (nameAndDomain.length == 2) {
etUsername.setText(nameAndDomain[0]);
etDomain.setText(nameAndDomain[1]);
} else {
etUsername.setText(nameAndDomain[0]);
}
isReLogin = true;
textViewSignIn.setText(R.string.msg_need_to_sign_in);
} else if (Constants.CLOUD_MANAGER != null) {
Expand Down

0 comments on commit 22feb3e

Please sign in to comment.