Beispiel #1
0
 @Override
 public void removeContactQueryListener(ContactQueryListener l) {
   super.removeContactQueryListener(l);
   contactQueryListenersCount--;
   if (contactQueryListenersCount == 0) {
     clearListeners();
   }
 }
Beispiel #2
0
 @Override
 public void addContactQueryListener(ContactQueryListener l) {
   super.addContactQueryListener(l);
   contactQueryListenersCount++;
   if (contactQueryListenersCount == 1) {
     initListeners();
   }
 }
Beispiel #3
0
  /**
   * If query has status changed to cancel, let's clear listeners.
   *
   * @param status {@link ContactQuery#QUERY_CANCELED}, {@link ContactQuery#QUERY_COMPLETED}
   */
  public void setStatus(int status) {
    if (status == QUERY_CANCELED) clearListeners();

    super.setStatus(status);
  }
Beispiel #4
0
  /**
   * Cancels this <tt>ContactQuery</tt>.
   *
   * @see ContactQuery#cancel()
   */
  public void cancel() {
    clearListeners();

    super.cancel();
  }