Beispiel #1
0
 @Override
 public void onChange(boolean selfUpdate) {
   if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
     log("presence changed, invalidate cache");
   }
   invalidateCache();
 }
Beispiel #2
0
  public static void invalidateCache() {
    if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
      log("invalidateCache");
    }

    // While invalidating our local Cache doesn't remove the contacts, it will mark them
    // stale so the next time we're asked for a particular contact, we'll return that
    // stale contact and at the same time, fire off an asyncUpdateContact to update
    // that contact's info in the background. UI elements using the contact typically
    // call addListener() so they immediately get notified when the contact has been
    // updated with the latest info. They redraw themselves when we call the
    // listener's onUpdate().
    sContactCache.invalidate();
  }