コード例 #1
0
 public BaseDialogMessagesAdapter(
     BaseActivity baseActivity, List<CombinationMessage> objectsList) {
   super(baseActivity, objectsList);
   dataManager = DataManager.getInstance();
   imageUtils = new ImageUtils(baseActivity);
   colorUtils = new ColorUtils();
   fileUtils = new FileUtils();
   currentUser = AppSession.getSession().getUser();
 }
コード例 #2
0
  private void login() {
    KeyboardUtils.hideKeyboard(this);

    loginType = LoginType.EMAIL;

    String userEmail = emailEditText.getText().toString();
    String userPassword = passwordEditText.getText().toString();

    if (new ValidationUtils(this)
        .isLoginDataValid(emailEditText, passwordEditText, userEmail, userPassword)) {

      showProgress();

      boolean ownerUser = DataManager.getInstance().getUserDataManager().isUserOwner(userEmail);
      if (!ownerUser) {
        DataManager.getInstance().clearAllTables();
      }

      login(userEmail, userPassword);
    }
  }