コード例 #1
0
ファイル: Controller.java プロジェクト: aljabrialam/PUPCCB
  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
ファイル: Controller.java プロジェクト: aljabrialam/PUPCCB
 public void registerResult(
     RegistrationResponse registrationResponse, RegistrationDetails registrationDetails) {
   if (activity instanceof Registration) {
     ((Registration) activity).registerResult(registrationResponse, registrationDetails);
   }
 }