Exemplo n.º 1
0
  public static DeckTask launchDeckTask(int type, TaskListener listener, TaskData... params) {
    oldInstance = instance;

    instance = new DeckTask();
    instance.listener = listener;
    instance.type = type;

    return (DeckTask) instance.execute(params);
  }
Exemplo n.º 2
0
  public static DeckTask launchDeckTask(int type, TaskListener listener, TaskData... params) {
    try {
      if ((instance != null) && (instance.getStatus() != AsyncTask.Status.FINISHED)) instance.get();
    } catch (Exception e) {
      e.printStackTrace();
    }

    instance = new DeckTask();
    instance.listener = listener;
    instance.type = type;

    return (DeckTask) instance.execute(params);
  }