If a query returns 100 rows and say only 10 rows fit in 1MB, then client
receiving the cursor from the ContentProvider needs to paginate.
ContentProvider returns count of total data everytime it returns a page
(= 1MB) of data to the client.
Returning total count causes reading (and skipping unwanted) data
from sqlite.
Instead, it should be sufficient to get total count once
and re-use the count value during the life of the cursor
until a requery is performed on the cursor.
(Count won't change unless data is changed - in which case
the cursor is asked to perform requery anyway. So doing count
once and reusing it should work)
Change-Id: I3520d94524dda07be9bcff56b6fbae5276af1d3b
Merge commit '4940ff85d561310d2c122ca6bd7de4d00772b095' into gingerbread-plus-aosp
* commit '4940ff85d561310d2c122ca6bd7de4d00772b095':
Update to new ddmlib-prebuilt api.
When a URL is malformed because the path does not start with a slash,
we assume that the path starts with the first character that is not
valid in the host and insert a leading slash. This is the reason why
the regex for the path component does not force a leading slash.
Bug: 1011602
Change-Id: I8efe46c058d2ee2d1a6a4406ee25dc021315222b
The WebAddress class provides a lenient parser for URLs. Currently, it
identifies the host portion with the regex [<chars>]+(\.[<chars>]+)* where
<chars> is the set of characters valid for the host name. This pattern excludes
the case where the host ends with a dot, which is valid possibility. As a
result, any trailing dot is pushed into the path component. Since we add a
leading slash to the path if one is missing, the result is a path that begins
with '/.'.
This fix changes the host regex to [<chars>]+[<chars>\.]* which allows trailing
dots and fixes the problem.
Bug: 2337042
Change-Id: I310512531787e0f742988f5d815ad944fd39e059
Merge commit '947e25e5ffe13549dab82580ef05f1f4faf42cd2' into gingerbread-plus-aosp
* commit '947e25e5ffe13549dab82580ef05f1f4faf42cd2':
Add BT test instrumentation for reboot tests.
Merge commit 'ac3c1f550f30aa793ccf5dcd0da55b070fd55364' into gingerbread
* commit 'ac3c1f550f30aa793ccf5dcd0da55b070fd55364':
Add BT test instrumentation for reboot tests.
Merge commit '97e58ef444da53165caab2a7be4fe44c154d5a0e' into gingerbread-plus-aosp
* commit '97e58ef444da53165caab2a7be4fe44c154d5a0e':
DO NOT MERGE Separate utility methods into utility class.
Methods in BluetoothTestUtils remain the same as they were in
BluetoothStressTest except for the constructor and close(). The constructor
is derived from setUp() and close() from tearDown().
Change-Id: Ifce16346f30eccdcc10ab846800e8a6fd2a24361
Methods in BluetoothTestUtils remain the same as they were in
BluetoothStressTest except for the constructor and close(). The constructor
is derived from setUp() and close() from tearDown().
Change-Id: Ib472878fee2aa1b678e8ee6743cac2373eb7507f
Methods in BluetoothTestUtils remain the same as they were in
BluetoothStressTest except for the constructor and close(). The constructor
is derived from setUp() and close() from tearDown().
Change-Id: I09f9637d3969c98e46cbde1d61bc6c3223aec7c1
* Add native library tests during package move
* Fix omission that let PackageSettings and ApplicationInfo get out of
sync.
Change-Id: Ic4958f971cb2c9cfd270522fdc120b4031c1124a
Merge commit 'f72b0e447296bc07104af62c33c56bc15b7a6677' into gingerbread-plus-aosp
* commit 'f72b0e447296bc07104af62c33c56bc15b7a6677':
DO NOT MERGE Add A2DP and Headset connection stress tests.
fixed a bug in SQLiteDatabase.isDatabaseIntegrityOk()
and added a new class to demonstrate use of
android.database.DatabaseErrorHandler
and a bunch of nits
Change-Id: Ia81870853fa3bd84074637f6d823a9fd22b66c7e
This change moves the native library handling earlier in the package
installation process so that it may be inserted into ASEC containers
before they are finalized in the DefaultContainerService.
Note that native libraries on SD card requires that vold mount ASEC
containers without the "noexec" flag on the mount point.
Change-Id: Ib34b1886bf6f94b99bb7b3781db6e9b5a58807ba
Merge commit 'd0ad67ad84e254cdf34963ad4152ca7158df5eab' into gingerbread-plus-aosp
* commit 'd0ad67ad84e254cdf34963ad4152ca7158df5eab':
Fix the test breakage in vCard tests.
- Make custom resolvers use official MockContentProvider instead of
relying on its own.
- Fix a test which is found to be broken after the fix above.
Bug: 2945326
Change-Id: Ifb14f61771215c103d8825240989eecee73d585a
Because the standard Looper.loop code calls Message#recycle it is
imperative that Handler#handleMessage code not attempt to resue
a message it receives. If allowed to do so it will cause bugs that
could be difficult to diagnois.
This change adds Message#flags and uses one bit to reliably detect
a message is in use and throws an error in MessageQueue#enqueueMessage.
This allows early detection of this bug.
Note: This is not new functionality, but the current implementation does
not detect messages that are in use because it uses Message#when != 0
as the detection mechanism. The problem is that a Message#when value of 0
is valid value used to place a message at the front of the queue and is
thus unreliable.
Another option is to change the setting of Message#when in Message#enqueueMessage
so that it is never 0, although that does change subtly a publicly accessible
field.
Yet another option would be to use other fields but all candidates have
similar problems as when in that they are publicly accessible or even
settable such as Message#target.
Change-Id: I040d6e546376f7b1ed1e4daa0d5644cce8bf333a