示例#1
0
 @Override
 public void removeContactQueryListener(ContactQueryListener l) {
   super.removeContactQueryListener(l);
   contactQueryListenersCount--;
   if (contactQueryListenersCount == 0) {
     clearListeners();
   }
 }
示例#2
0
 @Override
 public void addContactQueryListener(ContactQueryListener l) {
   super.addContactQueryListener(l);
   contactQueryListenersCount++;
   if (contactQueryListenersCount == 1) {
     initListeners();
   }
 }
示例#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);
  }
示例#4
0
  /**
   * Cancels this <tt>ContactQuery</tt>.
   *
   * @see ContactQuery#cancel()
   */
  public void cancel() {
    clearListeners();

    super.cancel();
  }