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

    super.cancel();
  }