diff options
author | Fred Quintana <fredq@google.com> | 2009-10-05 14:21:12 -0700 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2009-10-06 11:51:19 -0700 |
commit | 5bba632d877c2878384ff21566c8eb6a1a22f37b (patch) | |
tree | e8bd6afd4bb1df723420de4a6e7f17ab3a253427 /core/java/android/content/ContentProviderNative.java | |
parent | 5163cd6d1cb664977eb4473b98657c7e92ae430e (diff) | |
download | frameworks_base-5bba632d877c2878384ff21566c8eb6a1a22f37b.zip frameworks_base-5bba632d877c2878384ff21566c8eb6a1a22f37b.tar.gz frameworks_base-5bba632d877c2878384ff21566c8eb6a1a22f37b.tar.bz2 |
- hide Entity and all its references
- remove updateEntity and insertEntity, since they are not
used
- add the RawContacts.Entity class, which is used in lieu of the
android.content.Entity
Diffstat (limited to 'core/java/android/content/ContentProviderNative.java')
-rw-r--r-- | core/java/android/content/ContentProviderNative.java | 69 |
1 files changed, 9 insertions, 60 deletions
diff --git a/core/java/android/content/ContentProviderNative.java b/core/java/android/content/ContentProviderNative.java index e367ceb..adc3f60 100644 --- a/core/java/android/content/ContentProviderNative.java +++ b/core/java/android/content/ContentProviderNative.java @@ -155,28 +155,6 @@ abstract public class ContentProviderNative extends Binder implements IContentPr return true; } - case INSERT_ENTITIES_TRANSACTION: - { - data.enforceInterface(IContentProvider.descriptor); - Uri uri = Uri.CREATOR.createFromParcel(data); - Entity entity = (Entity) data.readParcelable(null); - Uri newUri = insertEntity(uri, entity); - reply.writeNoException(); - Uri.writeToParcel(reply, newUri); - return true; - } - - case UPDATE_ENTITIES_TRANSACTION: - { - data.enforceInterface(IContentProvider.descriptor); - Uri uri = Uri.CREATOR.createFromParcel(data); - Entity entity = (Entity) data.readParcelable(null); - int count = updateEntity(uri, entity); - reply.writeNoException(); - reply.writeInt(count); - return true; - } - case APPLY_BATCH_TRANSACTION: { data.enforceInterface(IContentProvider.descriptor); @@ -267,6 +245,9 @@ abstract public class ContentProviderNative extends Binder implements IContentPr return super.onTransact(code, data, reply, flags); } + /** + * @hide + */ private class IEntityIteratorImpl extends IEntityIterator.Stub { private final EntityIterator mEntityIterator; @@ -371,6 +352,9 @@ final class ContentProviderProxy implements IContentProvider return adaptor; } + /** + * @hide + */ public EntityIterator queryEntities(Uri url, String selection, String[] selectionArgs, String sortOrder) throws RemoteException { @@ -396,6 +380,9 @@ final class ContentProviderProxy implements IContentProvider return new RemoteEntityIterator(IEntityIterator.Stub.asInterface(entityIteratorBinder)); } + /** + * @hide + */ static class RemoteEntityIterator implements EntityIterator { private final IEntityIterator mEntityIterator; RemoteEntityIterator(IEntityIterator entityIterator) { @@ -506,44 +493,6 @@ final class ContentProviderProxy implements IContentProvider return results; } - public Uri insertEntity(Uri uri, Entity entity) throws RemoteException { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - - try { - data.writeInterfaceToken(IContentProvider.descriptor); - uri.writeToParcel(data, 0); - data.writeParcelable(entity, 0); - - mRemote.transact(IContentProvider.INSERT_ENTITIES_TRANSACTION, data, reply, 0); - - DatabaseUtils.readExceptionFromParcel(reply); - return Uri.CREATOR.createFromParcel(reply); - } finally { - data.recycle(); - reply.recycle(); - } - } - - public int updateEntity(Uri uri, Entity entity) throws RemoteException { - Parcel data = Parcel.obtain(); - Parcel reply = Parcel.obtain(); - - try { - data.writeInterfaceToken(IContentProvider.descriptor); - uri.writeToParcel(data, 0); - data.writeParcelable(entity, 0); - - mRemote.transact(IContentProvider.UPDATE_ENTITIES_TRANSACTION, data, reply, 0); - - DatabaseUtils.readExceptionFromParcel(reply); - return reply.readInt(); - } finally { - data.recycle(); - reply.recycle(); - } - } - public int delete(Uri url, String selection, String[] selectionArgs) throws RemoteException { Parcel data = Parcel.obtain(); |