summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/providers/tv/TvProvider.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/com/android/providers/tv/TvProvider.java b/src/com/android/providers/tv/TvProvider.java
index 835071e..2750740 100644
--- a/src/com/android/providers/tv/TvProvider.java
+++ b/src/com/android/providers/tv/TvProvider.java
@@ -845,6 +845,26 @@ public class TvProvider extends ContentProvider {
}
}
+ @Override
+ public int bulkInsert(Uri uri, ContentValues[] values) {
+ setBatchNotificationsSet(Sets.<Uri>newHashSet());
+ Context context = getContext();
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ db.beginTransaction();
+ try {
+ int result = super.bulkInsert(uri, values);
+ db.setTransactionSuccessful();
+ return result;
+ } finally {
+ db.endTransaction();
+ final Set<Uri> notifications = getBatchNotificationsSet();
+ setBatchNotificationsSet(null);
+ for (final Uri notificationUri : notifications) {
+ context.getContentResolver().notifyChange(notificationUri, null);
+ }
+ }
+ }
+
private void notifyChange(Uri uri) {
final Set<Uri> batchNotifications = getBatchNotificationsSet();
if (batchNotifications != null) {