コード例 #1
0
 /**
  * Notifies the model that an error has occurred while processing the request.
  *
  * @param controller The controller that initiated the request.
  */
 @Override
 protected void onError(TransportController controller, Exception e) {
   controller.getModel().notifyNetworkError();
   e.printStackTrace();
 }
コード例 #2
0
 /**
  * Tells the model that the stations have been updated.
  *
  * @param controller The controller that initiated the request, of which we have to notify of the
  *     result.
  * @param result The stations list gotten from the server.
  */
 @Override
 protected void onResult(TransportController controller, List<TransportStation> result) {
   ((TransportModel) controller.getModel()).setFavoriteStations(result);
 }