Java 类android.provider.ContactsContract.Directory 实例源码

项目:sms_DualCard    文件:BaseRecipientAdapter.java   
@Override
protected void publishResults(final CharSequence constraint, FilterResults results) {
    if (DEBUG) {
        Log.d(TAG, "DirectoryFilter#publishResult. constraint: " + constraint
                + ", mCurrentConstraint: " + mCurrentConstraint);
    }
    mDelayedMessageHandler.removeDelayedLoadMessage();
    // Check if the received result matches the current constraint
    // If not - the user must have continued typing after the request was issued, which
    // means several member variables (like mRemainingDirectoryLoad) are already
    // overwritten so shouldn't be touched here anymore.
    if (TextUtils.equals(constraint, mCurrentConstraint)) {
        if (results.count > 0) {
            @SuppressWarnings("unchecked")
            final ArrayList<TemporaryEntry> tempEntries =
                    (ArrayList<TemporaryEntry>) results.values;

            for (TemporaryEntry tempEntry : tempEntries) {
                putOneEntry(tempEntry, mParams.directoryId == Directory.DEFAULT,
                        mEntryMap, mNonAggregatedEntries, mExistingDestinations);
            }
        }

        // If there are remaining directories, set up delayed message again.
        mRemainingDirectoryCount--;
        if (mRemainingDirectoryCount > 0) {
            if (DEBUG) {
                Log.d(TAG, "Resend delayed load message. Current mRemainingDirectoryLoad: "
                        + mRemainingDirectoryCount);
            }
            mDelayedMessageHandler.sendDelayedLoadMessage();
        }
    }

    // Show the list again without "waiting" message.
    updateEntries(constructEntryList(false,
            mEntryMap, mNonAggregatedEntries, mExistingDestinations));
}
项目:ChipsLibrary    文件:BaseRecipientAdapter.java   
@Override
protected void publishResults(final CharSequence constraint,final FilterResults results)
  {
  if(DEBUG)
    Log.d(TAG,"DirectoryFilter#publishResult. constraint: "+constraint+", mCurrentConstraint: "+mCurrentConstraint);
  mDelayedMessageHandler.removeDelayedLoadMessage();
  // Check if the received result matches the current constraint
  // If not - the user must have continued typing after the request was issued, which
  // means several member variables (like mRemainingDirectoryLoad) are already
  // overwritten so shouldn't be touched here anymore.
  if(TextUtils.equals(constraint,mCurrentConstraint))
    {
    if(results.count>0)
      {
      @SuppressWarnings("unchecked")
      final ArrayList<TemporaryEntry> tempEntries=(ArrayList<TemporaryEntry>)results.values;
      for(final TemporaryEntry tempEntry : tempEntries)
        putOneEntry(tempEntry,mParams.directoryId==Directory.DEFAULT,mEntryMap,mNonAggregatedEntries,mExistingDestinations);
      }
    // If there are remaining directories, set up delayed message again.
    mRemainingDirectoryCount--;
    if(mRemainingDirectoryCount>0)
      {
      if(DEBUG)
        Log.d(TAG,"Resend delayed load message. Current mRemainingDirectoryLoad: "+mRemainingDirectoryCount);
      mDelayedMessageHandler.sendDelayedLoadMessage();
      }
    // If this directory result has some items, or there are no more directories that
    // we are waiting for, clear the temp results
    if(results.count>0||mRemainingDirectoryCount==0)
      // Clear the temp entries
      clearTempEntries();
    }
  // Show the list again without "waiting" message.
  updateEntries(constructEntryList(mEntryMap,mNonAggregatedEntries));
  }
项目:Calendar_lunar    文件:BaseRecipientAdapter.java   
@Override
protected void publishResults(final CharSequence constraint, FilterResults results) {
    if (DEBUG) {
        Log.d(TAG, "DirectoryFilter#publishResult. constraint: " + constraint
                + ", mCurrentConstraint: " + mCurrentConstraint);
    }
    mDelayedMessageHandler.removeDelayedLoadMessage();
    // Check if the received result matches the current constraint
    // If not - the user must have continued typing after the request was issued, which
    // means several member variables (like mRemainingDirectoryLoad) are already
    // overwritten so shouldn't be touched here anymore.
    if (TextUtils.equals(constraint, mCurrentConstraint)) {
        if (results.count > 0) {
            @SuppressWarnings("unchecked")
            final ArrayList<TemporaryEntry> tempEntries =
                    (ArrayList<TemporaryEntry>) results.values;

            for (TemporaryEntry tempEntry : tempEntries) {
                putOneEntry(tempEntry, mParams.directoryId == Directory.DEFAULT,
                        mEntryMap, mNonAggregatedEntries, mExistingDestinations);
            }
        }

        // If there are remaining directories, set up delayed message again.
        mRemainingDirectoryCount--;
        if (mRemainingDirectoryCount > 0) {
            if (DEBUG) {
                Log.d(TAG, "Resend delayed load message. Current mRemainingDirectoryLoad: "
                        + mRemainingDirectoryCount);
            }
            mDelayedMessageHandler.sendDelayedLoadMessage();
        }
    }

    // Show the list again without "waiting" message.
    updateEntries(constructEntryList(false,
            mEntryMap, mNonAggregatedEntries, mExistingDestinations));
}
项目:talk-android    文件:BaseRecipientAdapter.java   
@Override
protected void publishResults(final CharSequence constraint, FilterResults results) {
    if (DEBUG) {
        Log.d(TAG, "DirectoryFilter#publishResult. constraint: " + constraint
                + ", mCurrentConstraint: " + mCurrentConstraint);
    }
    mDelayedMessageHandler.removeDelayedLoadMessage();
    // Check if the received result matches the current constraint
    // If not - the user must have continued typing after the request was issued, which
    // means several member variables (like mRemainingDirectoryLoad) are already
    // overwritten so shouldn't be touched here anymore.
    if (TextUtils.equals(constraint, mCurrentConstraint)) {
        if (results.count > 0) {
            @SuppressWarnings("unchecked")
            final ArrayList<TemporaryEntry> tempEntries =
                    (ArrayList<TemporaryEntry>) results.values;

            for (TemporaryEntry tempEntry : tempEntries) {
                putOneEntry(tempEntry, mParams.directoryId == Directory.DEFAULT,
                        mEntryMap, mNonAggregatedEntries, mExistingDestinations);
            }
        }

        // If there are remaining directories, set up delayed message again.
        mRemainingDirectoryCount--;
        if (mRemainingDirectoryCount > 0) {
            if (DEBUG) {
                Log.d(TAG, "Resend delayed load message. Current mRemainingDirectoryLoad: "
                        + mRemainingDirectoryCount);
            }
            mDelayedMessageHandler.sendDelayedLoadMessage();
        }

        // If this directory result has some items, or there are no more directories that
        // we are waiting for, clear the temp results
        if (results.count > 0 || mRemainingDirectoryCount == 0) {
            // Clear the temp entries
            clearTempEntries();
        }
    }

    // Show the list again without "waiting" message.
    updateEntries(constructEntryList(mEntryMap, mNonAggregatedEntries));
}