示例#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);
      }
    }
  }
示例#2
0
 public void announcementListResult(List<Announcement> announcements) {
   if (activity instanceof NavigationDrawer) {
     ((NavigationDrawer) activity).getAnnouncementListResult(false, announcements);
   }
 }
示例#3
0
 public void ticketListResult(List<TicketInfo> ticketInfoList) {
   if (activity instanceof NavigationDrawer) {
     ((NavigationDrawer) activity).ticketListResult(false, ticketInfoList);
   }
 }