0cde89f5f025b7826be009ebb9673b970e180e32 |
|
10-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Use ashmem for CursorWindows. Bug: 5332296 The memory dealer introduces additional delays for reclaiming the memory owned by CursorWindows because the Binder object must be finalized. Using ashmem instead gives CursorWindow more direct control over the lifetime of the shared memory region. The provider now allocates the CursorWindows and returns them to clients with a read-only protection bit set on the ashmem region. Improved the encapsulation of CursorWindow. Callers shouldn't need to care about details like how string fields are allocated. Removed the compile-time configuration of string and numeric storage modes to remove some dead weight. Change-Id: I07c2bc2a9c573d7e435dcaecd269d25ea9807acd
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
d2183654e03d589b120467f4e98da1b178ceeadb |
|
09-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix ownership of CursorWindows across processes. Bug: 5332296 Ensure that there is always an owner for each CursorWindow and that references to each window are acquired/released appropriately at all times. Added synchronization to CursorToBulkCursorAdaptor to prevent the underlying Cursor and CursorWindow from being remotely accessed in ways that might violate invariants, resulting in leaks or other problems. Ensured that CursorToBulkCursorAdaptor promptly releases its references to the Cursor and CursorWindow when closed so they don't stick around longer than they should, even if the remote end hangs onto the IBulkCursor for some reason. CursorWindow respects Parcelable.FLAG_WRITE_RETURN_VALUE as an indication that one reference to the CursorWindow is being released. Correspondingly, CursorToBulkCursorAdaptor acquires a reference to the CursorWindow before returning it to the caller. This change also prevents races from resulting in the transfer of an invalid CursorWindow over the wire. Ensured that BulkCursorToCursorAdaptor promptly releases its reference to the IBulkCursor when closed and throws on attempts to access the cursor while closed. Modified ContentProviderNative to handle both parts of the wrapping and unwrapping of Cursors into IBulkCursors. This makes it a lot easier to ensure that the right things happen on both ends. Also, it turns out that the only caller of IContentProvider.bulkQuery was ContentProviderNative itself so there was no need to support bulkQuery on ContentProviderProxy and it was just getting in the way. Implement CloseGuard on CursorWindow. Change-Id: Ib3c8305d3cc62322f38a06698d404a2989bb6ef9
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
df6611d8c0cd69c3dcb93462eb138e0bbf137b88 |
|
09-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Clean up handrolled Binder proxies. Bug: 5332296 We can't replace these with AIDL generated proxies just yet, but at least we can make them a little more conformant. Change-Id: I1814f76d0f9c5e44a7fd85a12b2e3c2b7e3c9daa
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
eca53640a863b40ea9f96f280a90ce8aa538f9d1 |
|
02-Dec-2010 |
Fabrice Di Meglio <fdimeglio@google.com> |
Add better SQL exception handling to the Sync framework (see bug #3202693) - do the reply.writeNoException() only if there are NO exceptions - before, the code could actually generate an exception when asking for the count or the index, and then the exception could not be unmaarshalled because we previously calling reply.writeNoException() Change-Id: I241120878c3fc10fea5fbaeb74f9124b1413a3d4
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
23fdaf6fb62a9b5154b2508916a21c678462c5d0 |
|
06-Aug-2010 |
Dianne Hackborn <hackbod@google.com> |
Add new ContentProvider for doing conversions to data streams. This introduces basic infrastructure that should allow content providers holding complex data to perform on-demand conversion of their data to streams of various types. It is achieved through two new content provider APIs, one to interrogate the possible stream MIME types the provider can return, and the other to request a stream of data in a particular MIME type. Because implementations of this will often need to do on-demand data conversion, there is also a utility intoduced in ContentProvider for subclasses to easily run a function to write data into a pipe that is read by the client. This feature is mostly intended for cut and paste and drag and drop, as the complex data interchange allowing the source and destination to negotiate data types and copy (possible large) data between them. However because it is fundamental facility of ContentProvider, it can be used in other places, such as for more advanced GET_CONTENT data exchanges. An example implementation of this would be in ContactsProvider, which can now provider a data stream when a client opens certain pieces of it data, to return data as flat text, a vcard, or other format. Change-Id: I58627ea4ed359aa7cf2c66274adb18306c209cb2
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
9ffdfa0c238fce3b85741d7f6828fd484cd8f195 |
|
09-Mar-2010 |
Brad Fitzpatrick <bradfitz@android.com> |
Speed up ContentProvider.query() in simple case by ~30% When query() uses bulkQuery() and we know we're going to need some metadata right afterwards (number of rows and column index of _id, if present), just asked for it in the initial binder transaction instead of immediately fetching it again. Also, this defers loading column names until the client asks for them. This gets down the simpler (and very common) use cases of ContentProvider.query() down to 3 binder calls: QUERY_TRANSACTION to android.content.ContentProvider$Transport GET_CURSOR_WINDOW_TRANSACTION to android.database.CursorToBulkCursorAdaptor CLOSE_TRANSACTION to android.database.CursorToBulkCursorAdaptor More can still be done, but this is a good bite-sized first piece. Change-Id: I7ad45949f53e0097ff18c2478d659f0f36929693
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
dfb437e17c6ba3b29f9e636d064125668d706249 |
|
09-Mar-2010 |
Brad Fitzpatrick <bradfitz@android.com> |
Fix Parcel leak in ContentProvider.call() This manifested itself as memory allocation and Binder failures during my load testing / benchmarking. BUG=2498615 Change-Id: I260fd916f97777fc98bee98d10474f12deb21dee
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
1877d0158b529663b8315482e7346a7bcaa96166 |
|
05-Mar-2010 |
Brad Fitzpatrick <bradfitz@android.com> |
Add "call" method on ContentProvider. This permits implementing interfaces which are faster than using remote Cursors. It then uses it for Settings & SettingProvider, which together account for ~50% of total ContentProvider event loop stalls across Froyo dogfooders. For fetching Settings this looks like it should reduce average Settings lookup from 10 ms to 0.4 ms on Sholes, once the SettingsProvider serves most gets from in-memory cache. Currently it brings the Sholes average down from 10ms to 2.5 ms while still using SQLite queries on each get.
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
2ec6c5699181316e5a5c2cd293c006ac4a8bb101 |
|
10-Dec-2009 |
Fred Quintana <fredq@google.com> |
am 328c0e79: - removed the concept of Entity from the ContentProvider APIs - removed the parcelling ability from Entity and EntityIterator and made them public - added an EntityIterator abstract implementation that allow easy wrapping of a Cursor - changed the VCard c Merge commit '328c0e7986aa6bb7752ec6de3da9c999920bb55f' into eclair-mr2-plus-aosp * commit '328c0e7986aa6bb7752ec6de3da9c999920bb55f': - removed the concept of Entity from the ContentProvider APIs
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
5bba632d877c2878384ff21566c8eb6a1a22f37b |
|
05-Oct-2009 |
Fred Quintana <fredq@google.com> |
- 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
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
77709755b74bcc852cd511ff833c2827c0f0e1aa |
|
21-Aug-2009 |
Fred Quintana <fredq@google.com> |
- add a reset to EntityIterator to allow it to go back to the beginning - clean up the debug printing of SyncResult
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
03d9490758c9318cee6d14d3cc5007556dce92d0 |
|
22-May-2009 |
Fred Quintana <fredq@google.com> |
- create a new generic ISyncAdapter implementation, SyncAdapterNew - change the applyBatch to take an ArrayList rather than an [] - change Entity to be a final flass that contains ContentValues - remove the ability to update/insert Entities by a ContentProviderOperation
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
8943737692169f564cd34a9c8d471f3a5d438712 |
|
16-May-2009 |
Fred Quintana <fredq@google.com> |
add ipc support to batching
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
6a8d5332f00bdfade6674b312e7166940aa28348 |
|
08-May-2009 |
Fred Quintana <fredq@google.com> |
content provider entities
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
718d8a2d7ff3e864a73879eb646f46c14ab74d07 |
|
30-Apr-2009 |
Fred Quintana <fredq@google.com> |
decouple SyncAdapter from ContentProvider
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
076357b8567458d4b6dfdcf839ef751634cd2bfb |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@132589
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
3dec7d563a2f3e1eb967ce2054a00b6620e3558c |
|
03-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@137055
/frameworks/base/core/java/android/content/ContentProviderNative.java
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/core/java/android/content/ContentProviderNative.java
|