Loading core/java/android/content/ContentProviderNative.java +196 −196 Original line number Diff line number Diff line Loading @@ -332,7 +332,7 @@ final class ContentProviderProxy implements IContentProvider BulkCursorToCursorAdaptor adaptor) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading Loading @@ -381,11 +381,11 @@ final class ContentProviderProxy implements IContentProvider } } } return bulkCursor; } finally { data.recycle(); reply.recycle(); return bulkCursor; } } public IBulkCursor bulkQuery(Uri url, String[] projection, Loading Loading @@ -416,7 +416,7 @@ final class ContentProviderProxy implements IContentProvider { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -425,18 +425,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); String out = reply.readString(); return out; } finally { data.recycle(); reply.recycle(); return out; } } public Uri insert(Uri url, ContentValues values) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -446,17 +446,17 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); Uri out = Uri.CREATOR.createFromParcel(reply); return out; } finally { data.recycle(); reply.recycle(); return out; } } public int bulkInsert(Uri url, ContentValues[] values) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -466,18 +466,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); int count = reply.readInt(); return count; } finally { data.recycle(); reply.recycle(); return count; } } public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations) throws RemoteException, OperationApplicationException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); data.writeInt(operations.size()); for (ContentProviderOperation operation : operations) { Loading @@ -488,18 +488,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(reply); final ContentProviderResult[] results = reply.createTypedArray(ContentProviderResult.CREATOR); return results; } finally { data.recycle(); reply.recycle(); return results; } } public int delete(Uri url, String selection, String[] selectionArgs) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -510,18 +510,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); int count = reply.readInt(); return count; } finally { data.recycle(); reply.recycle(); return count; } } public int update(Uri url, ContentValues values, String selection, String[] selectionArgs) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -533,18 +533,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); int count = reply.readInt(); return count; } finally { data.recycle(); reply.recycle(); return count; } } public ParcelFileDescriptor openFile(Uri url, String mode) throws RemoteException, FileNotFoundException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -555,18 +555,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(reply); int has = reply.readInt(); ParcelFileDescriptor fd = has != 0 ? reply.readFileDescriptor() : null; return fd; } finally { data.recycle(); reply.recycle(); return fd; } } public AssetFileDescriptor openAssetFile(Uri url, String mode) throws RemoteException, FileNotFoundException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -578,18 +578,18 @@ final class ContentProviderProxy implements IContentProvider int has = reply.readInt(); AssetFileDescriptor fd = has != 0 ? AssetFileDescriptor.CREATOR.createFromParcel(reply) : null; return fd; } finally { data.recycle(); reply.recycle(); return fd; } } public Bundle call(String method, String request, Bundle args) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); data.writeString(method); Loading @@ -600,18 +600,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); Bundle bundle = reply.readBundle(); return bundle; } finally { data.recycle(); reply.recycle(); return bundle; } } public String[] getStreamTypes(Uri url, String mimeTypeFilter) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -621,18 +621,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); String[] out = reply.createStringArray(); return out; } finally { data.recycle(); reply.recycle(); return out; } } public AssetFileDescriptor openTypedAssetFile(Uri url, String mimeType, Bundle opts) throws RemoteException, FileNotFoundException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -645,11 +645,11 @@ final class ContentProviderProxy implements IContentProvider int has = reply.readInt(); AssetFileDescriptor fd = has != 0 ? AssetFileDescriptor.CREATOR.createFromParcel(reply) : null; return fd; } finally { data.recycle(); reply.recycle(); return fd; } } private IBinder mRemote; Loading core/java/android/database/BulkCursorNative.java +116 −115 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import android.os.RemoteException; /** Loading Loading @@ -67,7 +68,7 @@ public abstract class BulkCursorNative extends Binder implements IBulkCursor } reply.writeNoException(); reply.writeInt(1); window.writeToParcel(reply, 0); window.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE); return true; } Loading Loading @@ -184,51 +185,47 @@ final class BulkCursorProxy implements IBulkCursor { { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeInt(startPos); mRemote.transact(GET_CURSOR_WINDOW_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); CursorWindow window = null; if (reply.readInt() == 1) { window = CursorWindow.newFromParcel(reply); } return window; } finally { data.recycle(); reply.recycle(); return window; } } public void onMove(int position) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeInt(position); mRemote.transact(ON_MOVE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); } finally { data.recycle(); reply.recycle(); } } public int count() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); boolean result = mRemote.transact(COUNT_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); int count; Loading @@ -237,20 +234,21 @@ final class BulkCursorProxy implements IBulkCursor { } else { count = reply.readInt(); } return count; } finally { data.recycle(); reply.recycle(); return count; } } public String[] getColumnNames() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(GET_COLUMN_NAMES_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); String[] columnNames = null; Loading @@ -259,51 +257,52 @@ final class BulkCursorProxy implements IBulkCursor { for (int i = 0; i < numColumns; i++) { columnNames[i] = reply.readString(); } return columnNames; } finally { data.recycle(); reply.recycle(); return columnNames; } } public void deactivate() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(DEACTIVATE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); } finally { data.recycle(); reply.recycle(); } } public void close() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(CLOSE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); } finally { data.recycle(); reply.recycle(); } } public int requery(IContentObserver observer, CursorWindow window) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeStrongInterface(observer); window.writeToParcel(data, 0); boolean result = mRemote.transact(REQUERY_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); int count; Loading @@ -313,63 +312,65 @@ final class BulkCursorProxy implements IBulkCursor { count = reply.readInt(); mExtras = reply.readBundle(); } return count; } finally { data.recycle(); reply.recycle(); return count; } } public boolean getWantsAllOnMoveCalls() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(WANTS_ON_MOVE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); int result = reply.readInt(); return result != 0; } finally { data.recycle(); reply.recycle(); return result != 0; } } public Bundle getExtras() throws RemoteException { if (mExtras == null) { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(GET_EXTRAS_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); mExtras = reply.readBundle(); } finally { data.recycle(); reply.recycle(); } } return mExtras; } public Bundle respond(Bundle extras) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeBundle(extras); mRemote.transact(RESPOND_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); Bundle returnExtras = reply.readBundle(); return returnExtras; } finally { data.recycle(); reply.recycle(); return returnExtras; } } } Loading
core/java/android/content/ContentProviderNative.java +196 −196 Original line number Diff line number Diff line Loading @@ -332,7 +332,7 @@ final class ContentProviderProxy implements IContentProvider BulkCursorToCursorAdaptor adaptor) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading Loading @@ -381,11 +381,11 @@ final class ContentProviderProxy implements IContentProvider } } } return bulkCursor; } finally { data.recycle(); reply.recycle(); return bulkCursor; } } public IBulkCursor bulkQuery(Uri url, String[] projection, Loading Loading @@ -416,7 +416,7 @@ final class ContentProviderProxy implements IContentProvider { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -425,18 +425,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); String out = reply.readString(); return out; } finally { data.recycle(); reply.recycle(); return out; } } public Uri insert(Uri url, ContentValues values) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -446,17 +446,17 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); Uri out = Uri.CREATOR.createFromParcel(reply); return out; } finally { data.recycle(); reply.recycle(); return out; } } public int bulkInsert(Uri url, ContentValues[] values) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -466,18 +466,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); int count = reply.readInt(); return count; } finally { data.recycle(); reply.recycle(); return count; } } public ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations) throws RemoteException, OperationApplicationException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); data.writeInt(operations.size()); for (ContentProviderOperation operation : operations) { Loading @@ -488,18 +488,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(reply); final ContentProviderResult[] results = reply.createTypedArray(ContentProviderResult.CREATOR); return results; } finally { data.recycle(); reply.recycle(); return results; } } public int delete(Uri url, String selection, String[] selectionArgs) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -510,18 +510,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); int count = reply.readInt(); return count; } finally { data.recycle(); reply.recycle(); return count; } } public int update(Uri url, ContentValues values, String selection, String[] selectionArgs) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -533,18 +533,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); int count = reply.readInt(); return count; } finally { data.recycle(); reply.recycle(); return count; } } public ParcelFileDescriptor openFile(Uri url, String mode) throws RemoteException, FileNotFoundException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -555,18 +555,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(reply); int has = reply.readInt(); ParcelFileDescriptor fd = has != 0 ? reply.readFileDescriptor() : null; return fd; } finally { data.recycle(); reply.recycle(); return fd; } } public AssetFileDescriptor openAssetFile(Uri url, String mode) throws RemoteException, FileNotFoundException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -578,18 +578,18 @@ final class ContentProviderProxy implements IContentProvider int has = reply.readInt(); AssetFileDescriptor fd = has != 0 ? AssetFileDescriptor.CREATOR.createFromParcel(reply) : null; return fd; } finally { data.recycle(); reply.recycle(); return fd; } } public Bundle call(String method, String request, Bundle args) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); data.writeString(method); Loading @@ -600,18 +600,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); Bundle bundle = reply.readBundle(); return bundle; } finally { data.recycle(); reply.recycle(); return bundle; } } public String[] getStreamTypes(Uri url, String mimeTypeFilter) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -621,18 +621,18 @@ final class ContentProviderProxy implements IContentProvider DatabaseUtils.readExceptionFromParcel(reply); String[] out = reply.createStringArray(); return out; } finally { data.recycle(); reply.recycle(); return out; } } public AssetFileDescriptor openTypedAssetFile(Uri url, String mimeType, Bundle opts) throws RemoteException, FileNotFoundException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IContentProvider.descriptor); url.writeToParcel(data, 0); Loading @@ -645,11 +645,11 @@ final class ContentProviderProxy implements IContentProvider int has = reply.readInt(); AssetFileDescriptor fd = has != 0 ? AssetFileDescriptor.CREATOR.createFromParcel(reply) : null; return fd; } finally { data.recycle(); reply.recycle(); return fd; } } private IBinder mRemote; Loading
core/java/android/database/BulkCursorNative.java +116 −115 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import android.os.RemoteException; /** Loading Loading @@ -67,7 +68,7 @@ public abstract class BulkCursorNative extends Binder implements IBulkCursor } reply.writeNoException(); reply.writeInt(1); window.writeToParcel(reply, 0); window.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE); return true; } Loading Loading @@ -184,51 +185,47 @@ final class BulkCursorProxy implements IBulkCursor { { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeInt(startPos); mRemote.transact(GET_CURSOR_WINDOW_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); CursorWindow window = null; if (reply.readInt() == 1) { window = CursorWindow.newFromParcel(reply); } return window; } finally { data.recycle(); reply.recycle(); return window; } } public void onMove(int position) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeInt(position); mRemote.transact(ON_MOVE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); } finally { data.recycle(); reply.recycle(); } } public int count() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); boolean result = mRemote.transact(COUNT_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); int count; Loading @@ -237,20 +234,21 @@ final class BulkCursorProxy implements IBulkCursor { } else { count = reply.readInt(); } return count; } finally { data.recycle(); reply.recycle(); return count; } } public String[] getColumnNames() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(GET_COLUMN_NAMES_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); String[] columnNames = null; Loading @@ -259,51 +257,52 @@ final class BulkCursorProxy implements IBulkCursor { for (int i = 0; i < numColumns; i++) { columnNames[i] = reply.readString(); } return columnNames; } finally { data.recycle(); reply.recycle(); return columnNames; } } public void deactivate() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(DEACTIVATE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); } finally { data.recycle(); reply.recycle(); } } public void close() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(CLOSE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); } finally { data.recycle(); reply.recycle(); } } public int requery(IContentObserver observer, CursorWindow window) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeStrongInterface(observer); window.writeToParcel(data, 0); boolean result = mRemote.transact(REQUERY_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); int count; Loading @@ -313,63 +312,65 @@ final class BulkCursorProxy implements IBulkCursor { count = reply.readInt(); mExtras = reply.readBundle(); } return count; } finally { data.recycle(); reply.recycle(); return count; } } public boolean getWantsAllOnMoveCalls() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(WANTS_ON_MOVE_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); int result = reply.readInt(); return result != 0; } finally { data.recycle(); reply.recycle(); return result != 0; } } public Bundle getExtras() throws RemoteException { if (mExtras == null) { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); mRemote.transact(GET_EXTRAS_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); mExtras = reply.readBundle(); } finally { data.recycle(); reply.recycle(); } } return mExtras; } public Bundle respond(Bundle extras) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); try { data.writeInterfaceToken(IBulkCursor.descriptor); data.writeBundle(extras); mRemote.transact(RESPOND_TRANSACTION, data, reply, 0); DatabaseUtils.readExceptionFromParcel(reply); Bundle returnExtras = reply.readBundle(); return returnExtras; } finally { data.recycle(); reply.recycle(); return returnExtras; } } }