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

    super.cancel();
  }