| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Test: tested with POC in bug, also using atest
Bug: 224771621
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fb4a72e3943d166088407e61aa4439ac349f3f12)
Merged-In: Ide65205b83063801971c5778af3154bcf3f0e530
Change-Id: Ide65205b83063801971c5778af3154bcf3f0e530
|
| |
|
|
|
|
|
|
|
|
| |
Refactoring to avoid paying the cost of extra StringBuilder that are
quickly disposed.
Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Icd914a63cdadf8123c1e5a5073f85245f0791f0b
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A few months ago MediaProvider forked SQLiteQueryBuilder and we
fixed bugs in how the new insert(), update(), and delete() methods
were executed, but those fixes never made their way back upstream.
This CL is a clean cherry-pick of existing logic.
Bug: 155149941
Test: atest android.database.sqlite.cts.SQLiteQueryBuilderTest
Change-Id: I00d2ee88539b12d27a2ed99fff0546d1e3543b0e
|
| |
|
|
|
|
|
|
|
| |
Otherwise we'd risk applying different arguments to active versus
future connections.
Bug: 152005629
Test: atest CtsDatabaseTestCases:android.database.sqlite.cts.SQLiteDatabaseTest
Change-Id: I6e83a47d9874825fd14940245412372ef9227e79
|
| |
|
|
|
|
|
|
| |
Bug: 146914674
Bug: 140565622
Bug: 137381621
Test: manual
Change-Id: I903a13deb467b45839a7d03b60754c8fc464456c
|
| |
|
|
|
|
|
|
| |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.
Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.
For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.database.sqlite
android.database
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I2bcc7f0eee31a1775dd7a5dd0f291d0d37bc1292
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing appendWhere() methods aren't very friendly for
developers, since they require manual tracking of state to decide if
subsequent standalone chunks should be prefixed with "AND".
While it's tempting to offer direct argument binding on the builder
class, we can't really deliver on that API in a secure way, so instead
add separate bindSelection() method which explicitly burns arguments
into a standalone selection string, which can then be appended to
the builder.
This was the last piece of new functionality being used by
SQLiteStatementBuilder, so we can delete that class and migrate
users back to SQLiteQueryBuilder.
Bug: 111268862
Test: atest frameworks/base/core/tests/coretests/src/android/database/DatabaseUtilsTest.java
Test: atest frameworks/base/core/tests/utiltests/src/com/android/internal/util/ArrayUtilsTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest cts/tests/tests/database/src/android/database/sqlite/cts/SQLiteQueryBuilderTest.java
Change-Id: I418f24338c90bae8a9dad473fa76329cea00a8c5
|
| |
|
|
|
|
|
|
|
|
| |
The former aborts the current transaction, the latter restores the
state to a specified savepoint.
Test: CtsDatabaseTestCases
Test: DatabaseGeneralTest
Bug: 36957161
Change-Id: Ia0b189e8aac4687f10d8fbc07143a452f5f719c9
|
| |
|
|
|
|
|
|
|
|
| |
SQLite's internal representation for booleans is an integer with a value
of 0 or 1, so without this check, boolean values obtained via
DatabaseUtils#cursorRowToContentValues will always return false.
Bug: 34365384
Test: demo app, cts
Change-Id: I6c0829c992252ca5ee16bd5eac48668507fd4089
|
| |
|
|
|
|
|
|
|
|
|
| |
The existing code exits the column-filling loop immediately but
may continue to try to fill rows. Ordinarily this should fail
too but it's possible for the process to continue and then
blow up a little later. Fixed this problem by exiting the row-
filling loop promptly.
Bug: 21406130
Change-Id: Ifab59188d5d1b40f3c1f5c97604dd48da71bf37b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We continue to compile external/apache-http into ext.jar. This contains
a few changes apart fom the classes moving around :
- Makefile changes to build docs and api-stubs for now. A future change
will revert these changes and remove these classes from stubs and
docs.
- Hardcode event IDs in legacyerrorstrings to avoid a dependency between
the frameworks and apache. These strings are on their way out and will
never change anyway.
- Remove imports due to {@link} tags and use {@code} instead.
- Remove an accidental(?) dependency on apache commons code that's a
part of apache-http.
bug: 18027885
Change-Id: I51cd038d846ec7d02c283a4541b10a6a9cf62ecf
|
| |
|
|
|
|
|
| |
http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html
Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: Iaab02e718a7be7bda22e626dca05d79bfd2a8fc4
|
| |
|
|
|
|
|
|
|
|
|
| |
Application Devleopers are using queryNumEntries API
implemented by "COUNT(*)" to check whether a table is empty or not.
COUNT(*) has to process the entire table to compute the result.
But, "EXISTS" can stop after a single matching row has been found.
So, Using "EXISTS" is more faster than "COUNT(*)"
I added new API using "EXISTS" to check whether a table is empty or not
Change-Id: Idcc2633d0a5349c59f41e125cf34c9dc6622cdbe
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This class does not offer any advantages over SQLiteStatement
and just makes code more complex and error-prone.
Documented that the class is not thread-safe.
Removed a potential deadlock in insert() and replace() caused
by the insertInternal() method being synchronized in the case
where the class was being used concurrently (woe to you!).
Thread A would start a transaction.
Thread B would call insertInternal() and acquire the object monitor,
but block because it could not obtain the db connection because
thread A is holding onto it.
Thread A would call insertInternal() and block because Thread B
was holding the object monitor.
Deadlock.
Changed this code to use a transaction instead of a lock,
which provides the necessary mutual exclusion guarantee without
the potential for a deadlock. Even so, the class really isn't
thread safe.
Bug: 6625094
Change-Id: I51d9a15567a6f2bad6f25e550b48f8f6ffcab2a7
|
| |
|
|
|
| |
Bug: 6427830
Change-Id: I39451bb1e1d4a8d976ed1c671234f0c8c61658dd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the remote end of a bulk cursor died, then it was possible
for getColumnNames() to return null, violating the invariant
that it never returns null. As a result, the application could
crash in strange ways due to an NPE.
Since we are often interested in the column names anyhow, prefetch
them when setting up the bulk cursor adaptor. This way, a
remote cursor will never return null even if the remote end died.
It is possible for an application to continue to use a remote cursor
even after the provider has died unless it needs to requery it
for some reason. Of course at that point, bad things will
happen... but usually the app is better prepared for it than
if it just randomly encounters a null array of column names.
This change also optimizes the bulk cursor adaptor to return the
initial cursor window back to the client, potentially saving
an extra RPC. Because the communication protocol between
the CursorToBulkCursorAdaptor and BulkCursorToCursorAdaptor was
getting a little hard to follow, introduced a new type called
BulkCursorDescriptor to hold all of the necessary parameters.
Deleted several unnecessary IBulkCursor methods that are never
actually called remotely.
Bug: 6168809
Change-Id: I9aaf6f067c6434a575e2fdbf678243d5ad10755f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Change-Id: I18d3f49e413f48fcdd519d15e99c238ad54d35b9
|
| |
|
|
|
|
|
|
|
|
| |
For non-localized strings like the keywords in SQL statements, we shouldn't use
locale-specific case transformations.
(Cherry pick of 03f8f84c345e7c861a6de889d434b9d82cf04c8d.)
Bug: 4284951
Change-Id: Ib5180daf7892af7b645c906fdfeacf9da87bd667
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...to throttle contentobserver-based requeries
Why yes, I guess it could.
This also reworks AsyncTaskLoader to not generate multiple
concurrent tasks if it is getting change notifications before
the last background task is complete.
And removes some of the old APIs that had been deprecated but
need to be gone for final release.
And fixes a few little problems with applying the wrong theme
in system code.
Change-Id: Ic7a665b666d0fb9d348e5f23595532191065884f
|
| |
|
|
|
|
|
| |
SQL statements such as Create table, Pragma, Begin, Commit, Rollback
etc don't need a compiled statement.
Change-Id: I55f5e4e6cbb41cbe83e592e25ba852fe23e2b39f
|
| |
|
|
|
|
|
|
| |
All these methods promise to do nothing
if the requested column is not present,
but in fact throw exception.
Change-Id: I0e528d53a0425b831b0083ba82c75ba5b41bfdfd
|
| |\
| |
| |
| | |
Change-Id: I31b84d72186a918f19e0c9dee8fdebc83f661cc1
|
| | |\
| | |
| | |
| | | |
Change-Id: I8001a95f8c44ef0343e0a50de4bd5b5a85d41c38
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now you can filter the count statement with a selection
and selection args
UnitTests for this new methods are added to the cts project
Change-Id: Id9233aec0eaac08839041ae7cbaba203470ad3d8
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This depends on a kernel patch that implements read(2)
in the ashmem driver.
Bug http://b/issue?id=2595601
Change-Id: Ie3b10aa471aada21812b35e63954c1b2f0a7b042
|
| | | |
| | |
| | |
| | | |
Change-Id: Ie57aa71eb77a1e0fb058f4eb6f40d4144a6dfce7
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. move binding of args to one place - to SQLiteProgram
2. reduce locking time in SQLiteDatabase
3. reduce locking during time of binding of args
4. rmeove test for the deprecated ArrayListCursor
5. a couple of nits here and there
Change-Id: I20c33c8ffe3325df67af655f1d20614f7f727cb7
|
| | | |
| | |
| | |
| | |
| | | |
also fix bug# 2871037
Change-Id: I13325f8eabff4f218d3206905010803b61d8e2cd
|
| |\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
stacks in Binder replies" into gingerbread
Merge commit '3e5e21d4dc74751e64d17379c5563ece39a7e35d'
* commit '3e5e21d4dc74751e64d17379c5563ece39a7e35d':
StrictMode: gather and return violating stacks in Binder replies
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now, when Thread A has a strict mode policy in effect and does a
Binder call to Thread B (most likely in another process), the strict
mode policy is passed along, but with the GATHER penalty bit set which
overrides other policies and instead gathers all offending stack
traces to a threadlocal which are then written back in the Parcel's
reply header.
Change-Id: I7d4497032a0609b37b1a2a15855f5c929ba0584d
|
| |/
|
|
| |
Change-Id: I3ef1bcdb2eb1c45f68e829ccb6e3ecde28076591
|
| |
|
|
|
|
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|