Example #1
0
 private LoginResponse restoreUserLoginInfo() {
   String response =
       PreferenceUtil.getString(
           this, Constants.PREF.NAME_LONGIN_INFO, Constants.PREF.KEY_LONGIN_INFO);
   if (TextUtils.isEmpty(response)) {
     return null;
   }
   return new Gson().fromJson(response, LoginResponse.class);
 }
Example #2
0
 private void storeUserAccountInfo(final String userNo, final String pwd) {
   boolean isRemeberPwd = mRememberPwdToggleBtn.isChecked();
   UserAccountManager.storeUserAccount(this, userNo, isRemeberPwd ? pwd : "");
   PreferenceUtil.putBoolean(
       this,
       Constants.PREF.NAME_LONGIN_INFO,
       Constants.PREF.KEY_LONGIN_INFO_IS_REMEMBER_PWD,
       isRemeberPwd);
 }
Example #3
0
 private void initRememberPwdToggleBtnStatus() {
   mRememberPwdToggleBtn.setChecked(
       PreferenceUtil.getBoolean(
           this, Constants.PREF.NAME_LONGIN_INFO, Constants.PREF.KEY_LONGIN_INFO_IS_REMEMBER_PWD));
 }
Example #4
0
 private void storeUserLoginInfo(String response) {
   PreferenceUtil.putString(
       this, Constants.PREF.NAME_LONGIN_INFO, Constants.PREF.KEY_LONGIN_INFO, response);
 }