summaryrefslogtreecommitdiff
path: root/core/java/android/content/ContentProviderNative.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/content/ContentProviderNative.java')
-rw-r--r--core/java/android/content/ContentProviderNative.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/core/java/android/content/ContentProviderNative.java b/core/java/android/content/ContentProviderNative.java
index d1ab8d576412..abeeb7406957 100644
--- a/core/java/android/content/ContentProviderNative.java
+++ b/core/java/android/content/ContentProviderNative.java
@@ -110,16 +110,23 @@ abstract public class ContentProviderNative extends Binder implements IContentPr
IBulkCursor bulkCursor = bulkQuery(url, projection, selection,
selectionArgs, sortOrder, observer, window);
- reply.writeNoException();
if (bulkCursor != null) {
- reply.writeStrongBinder(bulkCursor.asBinder());
-
+ final IBinder binder = bulkCursor.asBinder();
if (wantsCursorMetadata) {
- reply.writeInt(bulkCursor.count());
- reply.writeInt(BulkCursorToCursorAdaptor.findRowIdColumnIndex(
- bulkCursor.getColumnNames()));
+ final int count = bulkCursor.count();
+ final int index = BulkCursorToCursorAdaptor.findRowIdColumnIndex(
+ bulkCursor.getColumnNames());
+
+ reply.writeNoException();
+ reply.writeStrongBinder(binder);
+ reply.writeInt(count);
+ reply.writeInt(index);
+ } else {
+ reply.writeNoException();
+ reply.writeStrongBinder(binder);
}
} else {
+ reply.writeNoException();
reply.writeStrongBinder(null);
}