Beispiel #1
0
  public void setError(ErrorHandler.Error error, MethodTypes methodTypes) {
    if (error.getErrorMessage().contains("java.io.EOFException")) {
      if (activity instanceof Main) {
        ((Main) activity).setError(error, methodTypes);
      } else if (activity instanceof Registration) {
        ((Registration) activity).setError(error, methodTypes);
      } else if (activity instanceof NewTicket) {
        ((NewTicket) activity).setError(error, methodTypes);
      } else if (activity instanceof NavigationDrawer) {
        ((NavigationDrawer) activity).setError(error, methodTypes);
      } else if (activity instanceof TicketDetails) {
        ((TicketDetails) activity).setError(error, methodTypes);
      }
    } else if (error.getErrorType().equals(ErrorHandler.ErrorType.LOGOUT)) {

    } else {
      if (activity instanceof Main) {
        ((Main) activity).setError(error, methodTypes);
      } else if (activity instanceof Registration) {
        ((Registration) activity).setError(error, methodTypes);
      } else if (activity instanceof NewTicket) {
        ((NewTicket) activity).setError(error, methodTypes);
      } else if (activity instanceof NavigationDrawer) {
        ((NavigationDrawer) activity).setError(error, methodTypes);
      } else if (activity instanceof TicketDetails) {
        ((TicketDetails) activity).setError(error, methodTypes);
      }
    }
  }
Beispiel #2
0
 public void registerResult(
     RegistrationResponse registrationResponse, RegistrationDetails registrationDetails) {
   if (activity instanceof Registration) {
     ((Registration) activity).registerResult(registrationResponse, registrationDetails);
   }
 }