Exemplo n.º 1
0
 protected HashMap<String, String> doInBackground(Void... paramVarArgs) {
   RegisterRequest localRegisterRequest = new RegisterRequest(Register.this.context);
   EditText localEditText1 = (EditText) Register.this.findViewById(2130968665);
   EditText localEditText2 = (EditText) Register.this.findViewById(2130968667);
   EditText localEditText3 = (EditText) Register.this.findViewById(2130968668);
   EditText localEditText4 = (EditText) Register.this.findViewById(2130968669);
   EditText localEditText5 = (EditText) Register.this.findViewById(2130968671);
   String str1 = localEditText1.getText().toString();
   String str2 = localEditText2.getText().toString();
   String str3 = localEditText3.getText().toString();
   String str4 = localEditText4.getText().toString();
   String str5 = localEditText5.getText().toString();
   HashMap localHashMap = new HashMap();
   try {
     if (str4.equals(str5)) {
       if (Register.this.allFieldsCompleted(str1, str2, str3, str4)) {
         return localRegisterRequest.validateRegistration(str1, str2, str3, str4);
       }
       localHashMap.put("errors", "All fields are required");
       localHashMap.put("success", "false");
       return localHashMap;
     }
   } catch (Exception localException) {
     localHashMap.put("errors", "Could not contact the remote service");
     localHashMap.put("success", "false");
     return localHashMap;
   }
   localHashMap.put("errors", "Passwords didn't match");
   localHashMap.put("success", "false");
   return localHashMap;
 }