/**
  * Cancels this <tt>ContactQuery</tt>.
  *
  * @see ContactQuery#cancel()
  */
 @Override
 public void cancel() {
   if (gQuery != null) {
     gQuery.cancel();
   }
   super.cancel();
 }
Exemple #2
0
 @Override
 public void removeContactQueryListener(ContactQueryListener l) {
   super.removeContactQueryListener(l);
   contactQueryListenersCount--;
   if (contactQueryListenersCount == 0) {
     clearListeners();
   }
 }
Exemple #3
0
 @Override
 public void addContactQueryListener(ContactQueryListener l) {
   super.addContactQueryListener(l);
   contactQueryListenersCount++;
   if (contactQueryListenersCount == 1) {
     initListeners();
   }
 }
 /**
  * Notifies this <tt>GoogleContactsQuery</tt> that it has stopped performing in the associated
  * background <tt>Thread</tt>.
  *
  * @param completed <tt>true</tt> if this <tt>ContactQuery</tt> has successfully completed,
  *     <tt>false</tt> if an error has been encountered during its execution
  * @see AsyncContactQuery#stopped(boolean)
  */
 @Override
 protected void stopped(boolean completed) {
   try {
     super.stopped(completed);
   } finally {
     getContactSource().stopped(this);
   }
 }
Exemple #5
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);
  }
Exemple #6
0
  /**
   * Cancels this <tt>ContactQuery</tt>.
   *
   * @see ContactQuery#cancel()
   */
  public void cancel() {
    clearListeners();

    super.cancel();
  }