コード例 #1
0
    /* (non-Javadoc)
     * @see de.dan_nrw.android.util.threading.LongTimeRunningOperation#handleUncaughtException(java.lang.Throwable)
     */
    @Override
    public void handleUncaughtException(Throwable ex) {
      if (ex instanceof IOException) {
        AlertDialogFactory.showErrorMessage(
            this.context, R.string.errorText, R.string.downloadException);

        finish();
      } else {
        throw new RuntimeException(ex);
      }
    }
コード例 #2
0
    /* (non-Javadoc)
     * @see de.dan_nrw.android.util.threading.LongTimeRunningOperation#afterOperationSuccessfullyCompleted(java.lang.Object)
     */
    @Override
    public void afterOperationSuccessfullyCompleted(List<Favourite> result) {
      if (result.size() < 1) {
        AlertDialogFactory.showInfoMessage(
            this.context, R.string.infoText, R.string.noFavouritesDefinedText);

        finish();

        return;
      }

      favourites = result;

      updateFavouritesAdapter();
    }