@Override public void onSuccess(int statusCode, Header[] headers, String responseString) { Response response = Response.getResponse(responseString); if (response.getCode() == ResponseCode.SUCCESS) { listener.onSuccess(); } else { listener.onFailure(response.getCode()); } }
@Override public void onFailure( int statusCode, Header[] headers, String responseString, Throwable throwable) { listener.onFailure(ResponseCode.ERROR_NETWORK); }