summaryrefslogtreecommitdiffstats
path: root/core/java/android/database
Commit message (Collapse)AuthorAgeFilesLines
* Add handling SQLiteDatabaseCorruptException.muzbit.kim2015-10-251-0/+2
| | | | | | | | | | | | | When SQLiteDatabaseCorruptException occurred on execute() or executeForString(), DefaultDatabaseErrorHandler.onCorrupt() is not to be called. So, Malformed DB file can't be deleted. Because, Instead SQLiteDatabaseCorruptException, code is throwing SQLiteException. On boot time, system can't open DB file and it throws RuntimeException. This causes infinite reset. So, I modified to throw SQLiteDatabaseCorruptException. Change-Id: I125b69d62acc4c0690b8dd17d4e14b49be141095 Signed-off-by: muzbit.kim <muzbit.kim@lge.com>
* Terminate loop properly when cursor window is full.Jeff Brown2015-06-011-2/+2
| | | | | | | | | | | 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
* am 5b0c0964: am fb861b6c: am 31fb202e: Merge "Frameworks/base: Compile-time ↵Andreas Gampe2015-04-221-7/+10
|\ | | | | | | | | | | | | optimize SQLiteConnection" * commit '5b0c0964d843319b1b89767cd3d3f1daa984df51': Frameworks/base: Compile-time optimize SQLiteConnection
| * Frameworks/base: Compile-time optimize SQLiteConnectionAndreas Gampe2015-04-211-7/+10
| | | | | | | | | | | | | | | | | | | | | | Do not cache compiled regular expression and date formatter. Both cannot be compile-time created, are expensive at preloading time, and only used in the rare case of dumping the connection (mainly on errors). Bug: 19498458 Bug: 19542228 Change-Id: Ia38491a3f852ccf699b815ff05289b338e932f2a
* | Expose Cursor.setExtras().Jeff Brown2015-04-093-11/+63
| | | | | | | | | | Bug: 19369537 Change-Id: I78e319667cbfaeb51f471d18c4fefeac01d49d80
* | Clean up AbstractCursor API.Jeff Brown2015-04-091-0/+53
| | | | | | | | | | | | | | | | Deprecated three protected fields that should not have been exposed in the API. Bug: 6353797 Change-Id: Ic6710f880a452dd1508abf0613907a1d2b1fb557
* | Remove deprecated fields in AbstractCursor.Jeff Brown2015-04-093-23/+4
| | | | | | | | | | Bug: 6353797 Change-Id: Ibf760f0aeef82c176e3c659a2ced3de07f8e8abe
* | Fix a few found doc problems.John Spurlock2015-03-242-5/+4
| | | | | | | | Change-Id: I98567f4a0fc96f501c00bf361688e2c55232f78d
* | Move apache specific portions of android.net.http to external/apache-http.Narayan Kamath2015-02-121-4/+24
|/ | | | | | | | | | | | | | | | | | | 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
* Print services setting changes not handled for managed profiles.Svetoslav2014-08-263-21/+55
| | | | | | | | | | | | | | | We keep per user settings for enabled print services which are observed to update the print manager service state. We were listening to all user changes but the handling code was not updating the state of the user whose settings changed, rather the current user. Added hidden APIs in content observer to know which user changed and now the print manager serivce handles content changes for the correct user. bug:16977006 Change-Id: I71ec88c8f3f38cb405844c13ab83695c2029eb79
* am b4606676: am 49538def: am 79e0206e: Merge "Init the static member when ↵Narayan Kamath2014-05-161-6/+9
|\ | | | | | | | | | | | | first used for CursorWindow." * commit 'b4606676a8e357f7b6de049099a04438f7c1b4eb': Init the static member when first used for CursorWindow.
| * am 49538def: am 79e0206e: Merge "Init the static member when first used for ↵Narayan Kamath2014-05-161-6/+9
| |\ | | | | | | | | | | | | | | | | | | CursorWindow." * commit '49538def98520eb57d4fb634bf09b2f3104e7953': Init the static member when first used for CursorWindow.
| | * Init the static member when first used for CursorWindow.yingying2014-05-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the CursorWindow will be preloaded by zygote, and there is one static member need use the system resource to initialize. But actually the zygote do not preload the resource now. (In fact, the zygote will preload classes first, then preload the resource.) We need ensure the zygote to create the system resource first. So change to init this static member as -1, and it will be evaluated when first used. Change-Id: Ibccb84e3c410c73788ac682fe76b720306e81dc4
* | | am df8b604e: Merge "Fix NPE in deleteDatabase()." into klp-modular-devJeff Brown2014-01-281-4/+6
|\ \ \ | |/ / | | | | | | | | | * commit 'df8b604e9bf49bcf9a620e4fe19ccf19c2c49487': Fix NPE in deleteDatabase().
| * | Fix NPE in deleteDatabase().Jeff Brown2014-01-241-4/+6
| |/ | | | | | | | | | | | | | | | | If the directory containing the database does not exist then listFiles() will return null. Tolerate this situation instead of crashing. Bug: 12600784 Change-Id: I5d83a867a5e8478f50887e5798b42c5f6859b77c
* | am 55a12adc: am 72a8fe6d: am 74661ff1: am b5558817: am 002ae75b: Merge ↵Narayan Kamath2014-01-082-59/+60
|\ \ | |/ | | | | | | | | | | "AArch64: Use long for pointers" * commit '55a12adc19b15df4068b90439dccb868534002c7': AArch64: Use long for pointers
| * AArch64: Use long for pointersAshok Bhat2014-01-082-59/+60
| | | | | | | | | | | | | | | | | | | | | | For storing pointers, long is used in CursorWindow and SQLiteConnection classes as native pointers can be 64-bit. Change-Id: Ia686006a7b8bdc7b95e5de0d0a294b155034a921 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* | Remove unused imports from frameworks/base.John Spurlock2013-11-202-2/+0
|/ | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Rename offer() to add(), remove/hide some APIs.Jeff Sharkey2013-09-091-2/+2
| | | | | | | | | Change MatrixCursor offer() to add() based on review feedback. Remove some now-unused XML metadata. Hide document creation, since it's not supported in initial version. Bug: 10577809, 10461706, 10678563 Change-Id: I7b3f4c6899c28f633471ef816bee22bf032aa0d2
* Docs changes pursuant to API review feedback.Jeff Brown2013-08-231-1/+4
| | | | Change-Id: I74c51791192f7fefad4e299d25c91438cbf6ab73
* Resized thumbnails; async; extend MatrixCursor.Jeff Sharkey2013-08-171-11/+36
| | | | | | | | | | | | | | | | | When requesting thumbnails, check if their dimensions are larger than requested, and downscale to avoid memory pressure. Load them async and with LruCache. Extend MatrixCursor so that RowBuilder can offer() columns without requiring they know the projection map. This makes it easier to respond to query() calls, where the remote side controls the projection map. Use it to handle custom projections in external storage backend. Update date/time formatting to match spec. Bug: 10333418, 10331689 Change-Id: I7e947a8e8068af8a39b55e6766b3241de4f3fc16
* am ca4553d3: am 7ffbcb28: am ca5d99ac: Merge "Guarantee that all db related ↵Marco Nelissen2013-08-081-1/+1
|\ | | | | | | | | | | | | files are deleted together." * commit 'ca4553d33fe779dcdf2daad4590e4dbcfec7b62f': Guarantee that all db related files are deleted together.
| * Merge "Guarantee that all db related files are deleted together."Marco Nelissen2013-08-071-1/+1
| |\
| | * Guarantee that all db related files are deleted together.jangwon.lee2013-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When deleting a db file, all db related files has to be deleted together like journal, wal, shm etc. Change-Id: I49d4581673d03fe669e9e0eaa2b50f7b9d3c34a4 Signed-off-by: jangwon.lee <jangwon.lee@lge.com>
* | | am 710f3e2c: am 60ae2617: Merge "If frameworks wants ASCII casing, it should ↵Elliott Hughes2013-08-021-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | explicity ask for it." * commit '710f3e2cc6bc2cdc2f2cddb2190823ea31efd52a': If frameworks wants ASCII casing, it should explicity ask for it.
| * | If frameworks wants ASCII casing, it should explicity ask for it.Elliott Hughes2013-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html Bug: https://code.google.com/p/android/issues/detail?id=58359 Change-Id: Iaab02e718a7be7bda22e626dca05d79bfd2a8fc4
* | | am dcb8d876: am 79df1e65: am e2a281ca: Merge "Add additional Method that ↵Jeff Brown2013-05-281-0/+12
|\ \ \ | |/ / | | | | | | | | | | | | | | | check whether a table is empty or not" * commit 'dcb8d876581f9bf77e51c5539ef68993870264d8': Add additional Method that check whether a table is empty or not
| * | am e2a281ca: Merge "Add additional Method that check whether a table is ↵Jeff Brown2013-05-281-0/+12
| |\ \ | | |/ | | | | | | | | | | | | | | | empty or not" * commit 'e2a281ca85f17eaf6d47978c76d2cafb0fa81782': Add additional Method that check whether a table is empty or not
| | * Merge "Add additional Method that check whether a table is empty or not"Jeff Brown2013-05-281-0/+12
| | |\
| | | * Add additional Method that check whether a table is empty or notHyoseong Kim2013-04-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Add API to retrieve cursor notification URI.Dianne Hackborn2013-05-153-1/+17
|/ / / | | | | | | | | | Change-Id: I89f6c4d6ee6ef3675eff62ff6bca691b54c69f75
* | | am 601afaef: Merge "Someone\'s IDE chose the wrong Date."Elliott Hughes2013-05-061-1/+1
|\ \ \ | |/ / | | | | | | | | | * commit '601afaef5220aef928a9235e50376c462538a942': Someone's IDE chose the wrong Date.
| * | Someone's IDE chose the wrong Date.Elliott Hughes2013-05-061-1/+1
| |/ | | | | | | | | | | Part 1 of the mystery of the java.sql.Date in preloaded-classes solved. Change-Id: I33fffec1f86e34167a76afc839d9f4ce31fa31f7
* | Don't dump sql bindargs unless verbose mode is requested.Jeff Brown2013-05-011-7/+7
| | | | | | | | | | Bug: 8780126 Change-Id: I88e238f9d684cc76731207e75370cbb2e0e476c5
* | Add ContentValues & CursorWindow to framework.aidlNick Pelly2013-04-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding these stubs, they will be automatically added to framework.aidl in sdk builds. This makes it easier for unbundled apps to pass these objects across AIDL calls. ContentValues & CursorWindow are already public Parcelables. It is an oversight that they were not already in framework.aidl. There are a lot of other public Parcelables that are missing from framework.aidl. This just fixes two commonly requested ones. Change-Id: If61e19b1206da1680413d9ea03de87a90b6d233e
* | am 4fd60792: am 5262a108: Merge "Complete documentation of whereArgs (Issue ↵Jeff Brown2013-02-081-0/+9
|\ \ | |/ | | | | | | | | | | | | | | #43061)" # By Tim Roes # Via Android Git Automerger (1) and others * commit '4fd60792473711a10dc9b27faa1a35efe9e4d6a0': Complete documentation of whereArgs (Issue #43061)
| * Merge "Complete documentation of whereArgs (Issue #43061)"Jeff Brown2013-02-081-0/+9
| |\
| | * Complete documentation of whereArgs (Issue #43061)Tim Roes2013-01-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complete the missing documentation for the whereArgs argument in delete, update and updateWithOnConflict Update: Removed trailing spaces Change-Id: I451ec9e0747c7655c612a4506f40152af0adcf3a Signed-off-by: Tim Roes <tim.roes88@googlemail.com>
* | | am 2990ed7a: am 3c6ee5b5: am d2bec096: Merge "NullPointerException in ↵Jeffrey Brown2013-02-061-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | SQLiteSession" # By László Dávid # Via Android Git Automerger (2) and others * commit '2990ed7a3bf7314bbd4d98161fbcdcf48098052c': NullPointerException in SQLiteSession
| * | Merge "NullPointerException in SQLiteSession"Jeffrey Brown2013-02-071-1/+1
| |\ \
| | * | NullPointerException in SQLiteSessionLászló Dávid2012-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I have found this bug with the FindBugs tool Change-Id: Ia167882f98c3cdb24332f420e0505e1af929b770 Signed-off-by: László Dávid <laszlo.david@gmail.com>
* | | | am 4e68024c: am 1e48b386: am 04ce0d25: Merge "Keep native callbacks when ↵Jeffrey Brown2013-02-061-0/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | primary SQLiteConnection is recreated" # By Niklas Brunlid # Via Android Git Automerger (2) and others * commit '4e68024c7e9cf5849bc7c57266b0079113a2562f': Keep native callbacks when primary SQLiteConnection is recreated
| * | | Merge "Keep native callbacks when primary SQLiteConnection is recreated"Jeffrey Brown2013-02-071-0/+7
| |\ \ \
| | * | | Keep native callbacks when primary SQLiteConnection is recreatedNiklas Brunlid2012-12-041-0/+7
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | When a database was ATTACHed/DETACHed to a database that had Write-Ahead Logging enabled, the primary SQLConnection was recreated but the registered native callbacks were not restored. Change-Id: I8787fee78e68197ae472e05cc694d11381defa71
* | | | am e646f943: am ca7b1210: am ea56499d: Merge "Potential NPE in SQLiteConnection"Jeffrey Brown2013-02-061-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | # By Sylvain Becuwe # Via Android Git Automerger (2) and others * commit 'e646f943fd7c4f9d81a4f2fb4de153a2ad9fd8bc': Potential NPE in SQLiteConnection
| * | | Merge "Potential NPE in SQLiteConnection"Jeffrey Brown2013-02-071-1/+1
| |\ \ \ | | |/ / | |/| |
| | * | Potential NPE in SQLiteConnectionSylvain Becuwe2012-10-281-1/+1
| | |/ | | | | | | | | | | | | Change-Id: I4d768bda5ea2fccb4a7c6ce7a5f074bf41563eac Signed-off-by: Sylvain Becuwe <sylvain.becuwe@gmail.com>
* | | Fix cursor window leak when query execution fails.Jeff Brown2013-01-082-10/+24
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the Cursor object is closed if a query on a content provider fails due to an error or is canceled during execution. There are several places in the code where similar problems can occur. To further reduce the likelihood of leaks, close the cursor window immediately when a query fails. Bug: 7278577 Change-Id: I8c686c259de80a162b9086628a817d57f09fdd13
* | am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-071-0/+0
|\ \ | | | | | | | | | | | | * commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04': Correct executable bit for source files
| * | Correct executable bit for source filesKenny Root2012-11-071-0/+0
| |/ | | | | | | | | | | | | | | | | Many media files and source code files were marked as executable in Git. Remove those. Also a shell script and python script were not marked as executable. Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5