03bd302aebbb77f4f95789a269c8a5463ac5a840 |
|
06-Mar-2012 |
Jeff Brown <jeffbrown@google.com> |
Don't close the database until all references released. SQLiteDatabase.close() should call releaseReference() rather than closing the database immediately. SQLiteDatabase should also hold a reference to itself while performing certain operations to ensure that they complete normally even if another thread closes the database at the same time. Fixed a couple of missing or redundant uses of acquireReference() related to CursorWindows. To be honest, the reference counting performed by SQLiteClosable should not be needed, but we're stuck with it in the API. Bug: 6104842 Change-Id: I3444a697409905d4a36b56418dc7766f5ba76b59
/frameworks/base/core/java/android/database/CursorWindow.java
|
5a05c23f3d6a1a895bf5917aacd8bd9a5302ba00 |
|
12-Jan-2012 |
Jeff Brown <jeffbrown@google.com> |
Clean up database tests a little bit. Change-Id: Ib05c699bf59187cb51627b5f352c2a15ad2c28bb
/frameworks/base/core/java/android/database/CursorWindow.java
|
650de3dcfcbc7635da3c070410ef1dc4027ae464 |
|
27-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Optimize fillWindow to improve reverse-seek performance. Bug: 5520301 When an application requests a row from a SQLiteCursor that is not in the window, instead of filling from the requested row position onwards, fill from a little bit ahead of the requested row position. This fixes a problem with applications that seek backwards in large cursor windows. Previously the application could end up refilling the window every time it moved back one position. We try to fill about 1/3 before the requested position and 2/3 after which substantially improves scrolling responsiveness when the list is bound to a data set that does not fit entirely within one cursor window. Change-Id: I168ff1d3aed1a41ac96267be34a026c108590e52
/frameworks/base/core/java/android/database/CursorWindow.java
|
ce6578acc5729f76fc93b6daafede413703a8d19 |
|
28-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
am 84bee4f8: Merge "Fix copyStringToBuffer row index calculation. Bug: 5515552" into ics-mr0 * commit '84bee4f8746a19428e0ddfd10df1130324dc39fa': Fix copyStringToBuffer row index calculation. Bug: 5515552
|
0772007b614d663b65510e5dc4ea264b2fdcb1fa |
|
28-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix copyStringToBuffer row index calculation. Bug: 5515552 Change-Id: I60aa25d2becd3195d6997d23ef5654a31e93bf71
/frameworks/base/core/java/android/database/CursorWindow.java
|
80e7b80fa607e13d31d7dab68ddfd4d9f0372e38 |
|
13-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Make default implementation of fillWindow typesafe. Bug: 5218310 This change fixes problems calling the default fillWindow on Cursors that contain BLOBs. It should also be more efficient by avoiding redundant string conversions for numeric datatypes. Change-Id: Ied515bf6299bc8d3c14e76055d85fd35e7c05952
/frameworks/base/core/java/android/database/CursorWindow.java
|
5e5d6d8ba04d7579df840cda055cd5dfa9d7666f |
|
13-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Deprecate local-only CursorWindows. There is no difference and has never really been a difference between local-only and remotable CursorWindows. By removing the distinction officially in the API, we will make it easier to implement CrossProcessCursor correctly. CrossProcessCursor is problematic currently because it's not clear whether a call to getWindow() will return a local-only window or a remotable window. As a result, the bulk cursor adaptor has special case handling for AbstractWindowedCursors vs. ordinary CrossProcessCursors so that it can set a remotable window before the cursor fills it. All these problems go away if we just forget about local-only windows being special in any way. Change-Id: Ie59f517968e33d0ecb239c3c4f60206495e8f376
/frameworks/base/core/java/android/database/CursorWindow.java
|
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/database/CursorWindow.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/database/CursorWindow.java
|
7ce745248d4de0e6543a559c93423df899832100 |
|
07-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Clean up CursorWindow lifetime. Bug: 5332296 Removed dead code in SQLiteCursor related to the use of a background query thread. This code could result in CursorWindows being modified concurrently or used after free. This code is broken, unused and is just in the way. Added comments to explain how CursorWindow ownership is supposed to work for AbstractWindowedCursors. (There are still cases where cursor windows get dropped on the floor without being closed. Those will be taken care of in a subsequent patch.) Cleaned up SQLiteQuery.fillWindow to eliminate duplicate code and remove bits that were only needed for background loading, like returning -1. Change-Id: I03e8e2e73ff0c11df76d63f57df4c5ada06ae1cb
/frameworks/base/core/java/android/database/CursorWindow.java
|
3bc6bbc92cd2095f42039b5aadd0a14d0e5d9230 |
|
06-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Clean up CursorWindow code. Bug: 5332296 The code is functionally equivalent, but a little more efficient and much easier to maintain. Change-Id: I90670a13799df05831843a5137ab234929281b7c
/frameworks/base/core/java/android/database/CursorWindow.java
|
d6c367f424229e4dac841893f69260295f50c33d |
|
02-Mar-2011 |
Vasu Nori <vnori@google.com> |
cosmetic fixes: removing unused members/imports Change-Id: I307e5d5c7c1270d2590ba66f4c3d3b1a96646344
/frameworks/base/core/java/android/database/CursorWindow.java
|
8a358a7eedae45178f55c3b514a15e8ae4b10dba |
|
02-Mar-2011 |
Vasu Nori <vnori@google.com> |
bug:3497143 don't print warning if it is a bug in platform - not in app. fixing a couple of very confusing warnings.. Change-Id: I3c91fa53fc73a2fb4bee213e33af56c4bdb75fd8
/frameworks/base/core/java/android/database/CursorWindow.java
|
0e453d1115d03b80c2779dfc600cf3a829b96435 |
|
06-Jan-2011 |
Vasu Nori <vnori@google.com> |
requery() should close cursorwindow insead of setting it to null. just in case GC takes a while to kick in. Change-Id: I3a00b52afe1303be0c7d6bb561e5c07734e4dcb3
/frameworks/base/core/java/android/database/CursorWindow.java
|
6141e13f6e84846ae531358a8bcbf6d2102b1bd4 |
|
24-Dec-2010 |
Vasu Nori <vnori@google.com> |
when cursorwindow allocation fails, print the number of cursors left open the reason for bug:3281533, bug:3127159 is probably too many cursors are left un-closed in the process. print the info on the number of cursors left open when the exception "cursorwindow allocation failed" occurs. This should help us figure out if that indeed is the reason and which process is leaving the cursors open. Change-Id: I4b46be63f5dfbe9b102ad7a9cf9dd21e70f71e14
/frameworks/base/core/java/android/database/CursorWindow.java
|
34ad57f0e844cd97f59d4ab22087d60d58650ba4 |
|
21-Dec-2010 |
Vasu Nori <vnori@google.com> |
resubmitting Change-Id: I67b1d04a5c9fc18b0cd4da6184d0b814b64d89e9 Change-Id: I67b1d04a5c9fc18b0cd4da6184d0b814b64d89e9 was reverted due to a bug. fixed the bug and resubmitting it here
/frameworks/base/core/java/android/database/CursorWindow.java
|
5274e84e88d2cba20ad3cb21c55c1758b4da8af4 |
|
20-Dec-2010 |
Vasu Nori <vnori@google.com> |
Revert "bug:2448371 cursorwindow size moved to resource xml file." This reverts commit 2594bae1f551d758c5c88771310d1ee3dc2c71ac.
/frameworks/base/core/java/android/database/CursorWindow.java
|
2594bae1f551d758c5c88771310d1ee3dc2c71ac |
|
19-Dec-2010 |
Vasu Nori <vnori@google.com> |
bug:2448371 cursorwindow size moved to resource xml file. let cursor window size be set per device in device resources file. default is 1MB. for SR, it is 2MB. it can be set to any value (in kB) in the device resource strings.xml file Change-Id: I67b1d04a5c9fc18b0cd4da6184d0b814b64d89e9
/frameworks/base/core/java/android/database/CursorWindow.java
|
b079e7d408617bb8d8ecde488e77c885c806bb42 |
|
03-Nov-2010 |
Jean-Baptiste Queru <jbq@google.com> |
am c91e4673: am bbd212d7: Merge "Document per-implementation behaviors of native get* methods" * commit 'c91e46730d14611fb85cd7b2d3e51dac5ce538a2': Document per-implementation behaviors of native get* methods
|
adf41944584f67378481e84cb7661f0a39028bd8 |
|
31-Oct-2010 |
Daniel Trebbien <dtrebbien@gmail.com> |
Document per-implementation behaviors of native get* methods Change-Id: I5d20d7796b85ce62750dd50dd79e47d76716b24c
/frameworks/base/core/java/android/database/CursorWindow.java
|
0a2c6cc0138ceac8164061b3cdc3758441916c18 |
|
15-Jun-2010 |
Vasu Nori <vnori@google.com> |
fix bugs introduced by I3ef1bcdb2eb1c45f68e829ccb6e3ecde28076591 two bugs were introduced by the above CL 1. to test if the column value is NULL, getType_native() should check if the columnindiex is valid. (it seems sometimes callers could ask if a given non-existent column is null - and the answer should be true.) 2. if a column is null and isBlob_native, isString_native methods should return true - not false. Change-Id: I64df75d0a3840a4502c00db8759c66ba4b268a26
/frameworks/base/core/java/android/database/CursorWindow.java
|
8b0dd7da360d70920a37802eb455ba41500d3b45 |
|
18-May-2010 |
Vasu Nori <vnori@google.com> |
add API to Cursor to get column value type Change-Id: I3ef1bcdb2eb1c45f68e829ccb6e3ecde28076591
/frameworks/base/core/java/android/database/CursorWindow.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/database/CursorWindow.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/database/CursorWindow.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/database/CursorWindow.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/database/CursorWindow.java
|
f013e1afd1e68af5e3b868c26a653bbfb39538f8 |
|
18-Dec-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/database/CursorWindow.java
|
54b6cfa9a9e5b861a9930af873580d6dc20f773c |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
/frameworks/base/core/java/android/database/CursorWindow.java
|