Bug: 5578022
Previously, Binder transactions failed silently, which caused
problems because apps would carry on assuming that the operation
had succeeded. Often, the apps would crash soon due to a violated
invariant, but sometimes they managed to do some damage first...
Change-Id: Ia9cc98b3b761a8160e7c4e87507860b5912c0451
* commit 'bcf05a69090f342d328f1537d1d83406b883290b':
Fix bug #5553401 TextLayoutCache is too verbose: "computeValuesWithHarfbuzz -- need to force to single run"
Lets the data traffic arrows work on LTE device on 1x,
but also lets telephony monitor for hung radios on 1X.
bug:5531630
Change-Id: I9fa25a5223afaa2e37373668c899ac28a95783fa
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
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
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
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
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
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
- welcome back start / count
- goodbye log clusters
- clean Paint code
- make private some functions as they should be
- improve memory allocation (create only one Shaper and reuse it for for shaping the runs in
the same input text)
Change-Id: I89a320c7f041319851308c8c9a919fbeafa82cdd
Bug: 5332296
The code is functionally equivalent, but a little more efficient
and much easier to maintain.
Change-Id: I90670a13799df05831843a5137ab234929281b7c
- the gain is about 5% and the timing is more stable
- use compare_type() and strictly_order_type()
Change-Id: Iab81869a8ba461ce786a468b6c59b8f34e8db838
This reverts commit 56c58f66b97d22fe7e7de1f7d9548bcbe1973029
This CL was causing the browser to crash when adding bookmarks, visiting the bookmarks page, and sharing pages (see bug http://b/issue?id=5369231
It's not okay to pass null to JNI methods and trust that it will just
back off and return a null result cleanly. Fixes bug 5361822 .
Change-Id: Id8a17b958fd183d55cb6475f394e158c13aae2ea
- makes TextLayoutCache not carring about start/count. Basically he will cache the result for
the full string and gives back the "chunk" corresponding to start/count
- changed the TextLayoutCacheValue API to take start/count parameters
- add Harfbuzz LogClusters in TextLayoutCacheValue as it is needed for extracting the start/count "chunk"
Change-Id: I4b38a4442428606de9a093303bbbe98181e1f89c
mManualBufferMode is only for CAMERA_MSG_PREVIEW_FRAME. If it is
CAMERA_MSG_COMPRESSED_IMAGE, a new byte array should be allocated.
bug:5340480
Change-Id: I4f33bd6297bfd30505e0e15ae46012ea44e85962
- use vector (instead of array) for advances and glyphs
- reverse glyphs directly in computeRunValuesWithHarfbuzz() (instead of reversing them after)
Change-Id: I716a8f914fd043818d7cb80cca76ee5fb0effb96
- need a copy constructor for the key as the GenerationCache we are using
is actually a KeyedVector<K, sp<Entry<K, V> > >
- use the getText() API to access the text in the cache key
Change-Id: I5b60ebc062b62308ed7ac1284cfe2a9f28e2b8b1
- makes TextLayoutCache not carring about start/count. Basically he will cache the result for
the full string and gives back the "chunk" corresponding to start/count
- changed the TextLayoutCacheValue API to take start/count parameters
- added the Harfbuzz LogClusters in TextLayoutCacheValue as it is needed for extracting the start/count "chunk"
- fix potential issue of cache key leaking
Change-Id: I9276f9bec744e8de36349acfba8429f7c6f83394