History log of /frameworks/base/core/jni/android_database_CursorWindow.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bce45617083209583d61afbea50994f2cdcda459 30-Oct-2011 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 2d280f75 to ics-mr1

Change-Id: I459e1cb0b60fb94dfb12862fedb9f8d949c226a7
89101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2 28-Oct-2011 Jeff Brown <jeffbrown@google.com> Improve the slow query instrumentation.

On user-debug and eng builds, you can set the
"db.log.slow_query_threshold" system property to queries that
take longer than the specified number of milliseconds.
Set it to 0 to log all queries.

This property has been around for a while but it was implemented
poorly. In particular, it *changed* the behavior of the query
by calling getCount() while holding the Db connection.
In normal operation, the query will not actually run until later.

By putting the timing logic into fillWindow() instead, we ensure
that we only measure queries that actually ran. We also capture
cases where the cursor window gets filled multiple times.

Bug: 5520301
Change-Id: I174f5e1ea15831a1d22a36e9a804d7755f230b38
/frameworks/base/core/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
715311fa5aeb39fd0904209e1428a3656c721c3d 07-Oct-2011 Jeff Brown <jeffbrown@google.com> Fix regression in CursorWindow.getString()
Bug: 5332296

NewStringUTF expects modified UTF-8, so it barfs on UTF-8 strings
that contain high codepoints. Even though it results in an extra
copy being performed, first convert to UTF-16, then call NewString.

Change-Id: Idbfeb3cc2c4b731834e4482848dcac2fa33ec2d0
/frameworks/base/core/jni/android_database_CursorWindow.cpp
d0ff68da6a606602235fb8749473999e3d1bde53 07-Oct-2011 Jeff Brown <jeffbrown@google.com> Fix regression in CursorWindow.copyStingToBuffer.
Bug: 5332296

Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
/frameworks/base/core/jni/android_database_CursorWindow.cpp
aa32c30b81134fc7ebd9408f4757d1dc4410f338 07-Oct-2011 Jeff Brown <jeffbrown@google.com> Restore broken CursorWindow.getType behavior.
Bug: 5430009

Some CTS tests try to call getType on fields in empty
cursor windows or with out of bound column indices (-1).
Restoring the previous behavior of returning FIELD_TYPE_NULL
instead of throwing. Fix this later.

Change-Id: I782bd02012474e7dabc5bb7ea2dc45e8b0c7ef25
/frameworks/base/core/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
f786b6ca5df079f5cc84838251137f9b65ae10c9 01-Sep-2011 Jeff Brown <jeffbrown@google.com> Fix JNI leak in copyStringToBuffer
Bug: 5244396

Code was acquiring the char array twice for FIELD_TYPE_INTEGER
or FIELD_TYPE_FLOAT but only releasing it once.

Removed the redundant calls to GetCharArrayElements.

Change-Id: If767d3295d5a663a823e5ca0cd979379a3ccd024
/frameworks/base/core/jni/android_database_CursorWindow.cpp
e6044145bccf30e2b1785eb33a26de6496167986 25-Feb-2011 Vasu Nori <vnori@google.com> bug:3467948 if byteArray couldn't be allocated for blob, throw exception

Change-Id: I73e36c10f31086ea567debad536350316b2df67f
/frameworks/base/core/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
b37f8a8af15425ed3e65104e8556099d33a9c1ce 29-Nov-2010 Vasu Nori <vnori@google.com> fix messages from sqlite layer in c++ code to be useful.

Change-Id: Ib13f86f3481aae391f5e887bb14877f12bf48034
/frameworks/base/core/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
8b0dd7da360d70920a37802eb455ba41500d3b45 18-May-2010 Vasu Nori <vnori@google.com> add API to Cursor to get column value type

Change-Id: I3ef1bcdb2eb1c45f68e829ccb6e3ecde28076591
/frameworks/base/core/jni/android_database_CursorWindow.cpp
2807df89af680e46cb35ee0035bb10b42d3136a2 27-May-2010 Mike Lockwood <lockwood@android.com> Move CursorWindow class from core/jni to libbinder

To allow use of the native CursorWindow class outside of the core framework jni

Change-Id: I72e8dcb91a2c691130c33cdfd9a25d343da1c592
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/android_database_CursorWindow.cpp
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/jni/android_database_CursorWindow.cpp
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android_database_CursorWindow.cpp
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android_database_CursorWindow.cpp
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/jni/android_database_CursorWindow.cpp