You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations)
throws OperationApplicationException {
final SQLiteDatabase db = getOpenHelper().getWritableDatabase();
db.beginTransaction();
try {
final int numOperations = operations.size();
final ContentProviderResult[] results = new ContentProviderResult[numOperations];
for (int i = 0; i < numOperations; i++) {
results[i] = operations.get(i).apply(this, results, i);
}
db.setTransactionSuccessful();
return results;
} finally {
db.endTransaction();
}````
should respect ContentProviderOperation.withYieldAllowed() by
checking each operation on the for loop if it allows yield and applying a
db yieldifContentSafely
example code can be seen in the android contacts provider src code
The text was updated successfully, but these errors were encountered:
The code
The text was updated successfully, but these errors were encountered: