コード例 #1
0
  public static void notifyConversationListChanged() {
    final Context context = Factory.get().getApplicationContext();
    final ContentResolver cr = context.getContentResolver();
    cr.notifyChange(CONVERSATIONS_URI, null);

    // Notify the widget the conversation list changed
    BugleWidgetProvider.notifyConversationListChanged(context);
  }
コード例 #2
0
  /**
   * Notifies that <i>all</i> data exposed by the provider needs to be refreshed.
   *
   * <p><b>IMPORTANT!</b> You probably shouldn't be calling this. Prefer to notify more specific
   * uri's instead. Currently only sync uses this, because sync can potentially update many
   * different tables at once.
   */
  public static void notifyEverythingChanged() {
    final Uri uri = Uri.parse(CONTENT_AUTHORITY);
    final Context context = Factory.get().getApplicationContext();
    final ContentResolver cr = context.getContentResolver();
    cr.notifyChange(uri, null);

    // Notify any conversations widgets the conversation list has changed.
    BugleWidgetProvider.notifyConversationListChanged(context);

    // Notify all conversation widgets to update.
    WidgetConversationProvider.notifyMessagesChanged(context, null /*conversationId*/);
  }