summaryrefslogtreecommitdiff
path: root/android
AgeCommit message (Collapse)Author
2020-05-11Fix 'ALTER RENAME TABLE' compat issueZim
This CL disables SQLite's new behavior in "ALTER RENAME TABLE" introduced in version 3.25.0 (https://www.sqlite.org/changes.html). In this new behavior, when renaming a table, SQLite would automatically update all the views and triggers referencing to it, which is nice if an app is always using 3.25 or later. However, in practice, almost all android apps have to support older android versions where this behavior is not supported, apps just can't rely on this feature. Other downsides of the new behavior (in the context of android ecosystem) includes: - Because the new behavior would crash an app when a rename would cause a dangling view or trigger *even when the app does have a fix-up step after ALTER RENAME TABLE* in which case it'd just work fine at the end, it is very risky to enable the new behavior on all apps. - This new behavior also means existing upgrade steps (which may have been introduced years ago) could suddenly fail, if the step is executed in R. This means, if an app used an "ALTER TABLE RENAME" in the upgrade step from ver 1 to ver 2 five years ago and never after, and almost all users are already running ver 2 or newer, *if* there's still a user who are on ver 1, upgrading the app to the latest version could suddenly fail on R. Applications wishing to enable the new behavior can enable it at runtime with the following call: SQLiteDatabase db = ....; // open a DB db.execPerConnectionSQL("PRAGMA legacy_alter_table = 0;", null); Test: atest SQLiteSecurityTest Bug: 147928666 Change-Id: I64546deebd3782ed685fcb46498bc487e0f8d5b6
2019-08-27sqlite3_android.cpp: disable _TOKENIZENick Kralevich
Comment out the tokenize function. This code doesn't appear to be used. A future change will further clean up this code and delete it properly. Bug: 139186193 Test: compiles and boots Change-Id: I0b2c37b6716162228205fc1ca8bea0f397f36baf
2019-07-18Support loose comparison using minimum matched charsTaesu Lee
Specific min match is required for each country. Test: Manual Change-Id: I2f1355c4ba712170464e4c23a916024e0bf58e71 Merged-In: I2f1355c4ba712170464e4c23a916024e0bf58e71 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com> Bug:134246556
2019-07-15Merge "Remove all ICU integration for sqlite on host"Neil Fuller
am: 6ba0946797 Change-Id: I5bddf8d087d0464f41140cabdedb58e8ff52a4cf
2019-06-21Remove all ICU integration for sqlite on hostNeil Fuller
Maintaining external/icu for non-device usecases is becoming an increasing burden and there are no tests around sqlite / libsqlite on host that indicate what support is needed. There doesn't appear to be any ICU initialization code in place on host suggesting ICU usage is limited to functions that don't require data. This change removes ICU integration with sqlite on host entirely to try to flush out affected users. If there are no complaints that will be one less dependency to worry about. Bug: 130787951 Test: build / treehugger Test: Ran sqlite3 on host Change-Id: Icd1eb97281d941a3f55c4289b6d65fe5921ed542
2019-05-14Merge "Enable native_bridge_support for libsqlite" am: 11253fa3e8Dimitry Ivanov
am: 08675b42a3 Change-Id: I020be050444180572c16d531b9802ba6bb5cdffb
2019-05-14Enable native_bridge_support for libsqlitedimitry
Android build system added support for building translated binaries used on natively bridge targets (arm on x86 for example). However in order to avoid building unnecessary binaries and libraries for such architectures most modules do not support native bridge by default. All needed modules have to explicitly indicate if they may be used as part of translated binary build. This change enabled native bridge support for libsqlite because is a greylisted library and needs to be available to apps targeting Andorid version < 24 Bug: http://b/77159578 Test: make Change-Id: Idc03773014ef2ddd20e4c6b164cb5f4cd3f2d142
2019-05-01Unit test of strict match on russian number.Hui Yu
Bug: 129698226 Test: atest external/sqlite/android Change-Id: Ifcea4f77f73b8f669a4f3b11a6c2e11a97580bc4
2019-01-07Use ICU in libandroidicuVictor Chang
libicuuc and libicui18n are moved into APEX, but they have no stable ABI due to the version suffix. Use libandroidicu which provides stable symbol. See http://go/apex-stable-icu4c-interface for the design. Bug: 117094880 Test: m checkbuild Merged-In: Iab88307452d9467ddebc0d4dfc5a4799ff54324f Change-Id: Iab88307452d9467ddebc0d4dfc5a4799ff54324f (cherry picked from commit 57caede3b8ab913890639390dbc3ee9af6c1726f)
2019-01-04Use ICU in libandroidicuVictor Chang
libicuuc and libicui18n are moved into APEX, but they have no stable ABI due to the version suffix. Use libandroidicu which provides stable symbol. See http://go/apex-stable-icu4c-interface for the design. Bug: 117094880 Test: m checkbuild Change-Id: Iab88307452d9467ddebc0d4dfc5a4799ff54324f
2017-09-29Merge "Use -Werror in external/sqlite" am: 0d42d6b303 am: 545d8fbaaf am: ↵Chih-Hung Hsieh
2384f6bc0b am: 344ea259af Change-Id: Ie6a11319dbbdc35637895db1e60c149e301faf9f
2017-09-29Use -Werror in external/sqliteChih-Hung Hsieh
* Supress non-critical warnings. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: Id116ab578184a9d43ca4a8549e78889b79ea49aa
2017-09-18Merge "Fix false positives comparing local and intl numbers"Francisco Pimenta
2017-09-07ICU is disabled by Android.bpJiyong Park
By using vendor.cflags, SQLITE_ENABLE_ICU is on/off from Android.bp. No need to def/undef it inside the source code. Bug: 64514237 Test: BOARD_VNDK_VERSION=current m -j libsqlite libsqlite.vendor Merged-In: If9771fa020e528445275281017e424a5bbc2ae99 Change-Id: If9771fa020e528445275281017e424a5bbc2ae99 (cherry picked from commit 633397eeef296584d3242d8a72790dcf11bb36fd)
2017-09-05Mark libsqlite as vendor_availableJiyong Park
There are some vendor libs that are using libsqlite. So marking it as vendor_available. Bug: 37560614 Test: BOARD_VNDK_VERSION=current m -j libsqlite.vendor Change-Id: I45823c4d42071f505583a955564cdd78742e8029 Merged-In: I45823c4d42071f505583a955564cdd78742e8029
2017-08-11ICU is disabled by Android.bpJiyong Park
By using vendor.cflags, SQLITE_ENABLE_ICU is on/off from Android.bp. No need to def/undef it inside the source code. Bug: 64514237 Test: BOARD_VNDK_VERSION=current m -j libsqlite libsqlite.vendor Change-Id: If9771fa020e528445275281017e424a5bbc2ae99
2017-08-10Don't use ICU when built for vendorsJiyong Park
libicuuc.so isn't available for vendors, thus ICU is turned off when libsqlite is built for vendors. Bug: 64104535 Test: BOARD_VNDK_VERSION=current m -j libsqlite.vendor Merged-In: I682502ba5bdc5f76a0363a95d01b1081c1bc01a4 Change-Id: I682502ba5bdc5f76a0363a95d01b1081c1bc01a4 (cherry picked from commit b4076dfd66f114263a1f70cf3ba73c2d55ccb3b0)
2017-08-10Don't use ICU when built for vendorsJiyong Park
libicuuc.so isn't available for vendors, thus ICU is turned off when libsqlite is built for vendors. Bug: 64104535 Test: BOARD_VNDK_VERSION=current m -j libsqlite.vendor Change-Id: I682502ba5bdc5f76a0363a95d01b1081c1bc01a4
2017-07-18Fix false positives comparing local and intl numbersFrancisco Pimenta
Previously when comparing local phone numbers with international it was possible to match the wrong number because the first digit of the area code was being treated as a skippable trunk digit, e.g: "550-123-4567" would be considered equal to "+14501234567". Since there are two different algorithms (loose/old and strict) there are two solutions with the same basic goal: Only ignore mismatches if there's an actual extra digit which could possibly be the trunk digit, i.e: "0550-123-4567" is acceptable as equal to "+15501234567". NB: The US not having a trunk digit to begin with is a different issue entirely - the code is agnostic on which country has which trunk digits! For "loose" matching we achieve this by checking the length of the mismatch. For "strict" matching we keep track of the supposed trunk digit and compare it against the current position in match. So for the above example 5 != 4. Several new unit tests were added (including replicating tests for OldPhoneNumberUtils). I broke down the c++ tests into smaller methods for additional readability. NB: By adding more tests I uncovered that two digit trunk prefixes were never handled correctly for the "strict" matching case. "Loose" matching is much more robust. I commented out the "strict" test cases. Test: All unit tests pass for PhoneNumberUtilsTest, OldPhoneNumberUtilsTest and DatabaseGeneralTest. Bug: 63179537 Bug: 63178542 Bug: 62916088 Change-Id: Idc2a1c2c2f64ed29995208503de4755c521e1c82
2017-06-26Mark libsqlite as vendor_availableJiyong Park
There are some vendor libs that are using libsqlite. So marking it as vendor_available. Bug: 37560614 Test: BOARD_VNDK_VERSION=current m -j libsqlite.vendor Change-Id: I45823c4d42071f505583a955564cdd78742e8029
2017-04-19Convert external/sqlite to Android.bpColin Cross
See build/soong/README.md for more information. Test: m -j checkbuild Change-Id: I649eecd3948fbe49bb153b14a8eae9b110a79734
2016-09-13external/sqlite/android cleanup.Elliott Hughes
Removes dead use of deprecated ucol_getShortDefinitionString. Converts PhoneNumberUtils tests to gtest. Bug: http://b/31459453 Change-Id: I4662e25d711868e21afb0661602c64852f0cef65
2016-09-12Rename libicuuc-host/libicui18n-host to libicuuc/libicui18nDan Willemsen
These modules can be named the same between the target and host libraries, which simplifies references to them, particularly in Soong. To prevent accidentally loading the system copy of the library, we still rename the installed name to be libicu*-host.so. But modules do not need to know that in order to build against them. Change-Id: I4735599feb73225b2bea6dee42bbc23118693765
2015-01-05Remove hardcoded ICU include paths.Narayan Kamath
ICU exports them using LOCAL_EXPORT_C_INCLUDE_DIRS. bug: 18581021 Change-Id: I98048a4f6a9163fff6d3a71712d8249b2b00d04b
2014-07-09Switch sqlite to the new icu.Elliott Hughes
Change-Id: I16a4b5c0d7b46a4edd61d75ba017669b0daafc90
2014-05-23Remove deprecated WITH_HOST_DALVIK.Ian Rogers
Bug: 13751317 Change-Id: I64e66eb34dbe10b39ec2e8c37da0038705b4931f
2013-07-23add static dependency on liblogColin Cross
Change-Id: I21a4e18f0d2aacaf76421b62d693c2ae7eb08f30
2013-03-06am b4e9e379: Merge "fix build problem, when #define ENABLE_ANDROID_LOG 1"Elliott Hughes
* commit 'b4e9e379e360464d3d6bde3084e5b286238a9329': fix build problem, when #define ENABLE_ANDROID_LOG 1
2013-03-06fix build problem, when #define ENABLE_ANDROID_LOG 1Hyejin Kim
Change-Id: I514750dd33ff5bd433d4ee167a2401d829d2fbe9
2013-02-25Remove GET_PHONEBOOK_INDEX callbackJay Shrauner
Remove sqlite GET_PHONEBOOK_INDEX callback. Bug: Change-Id: I751bb4fdff89af1eccc4b21b67fddd0b802eeb61
2013-02-05Fix contacts index labels for i18nJay Shrauner
Switch ContactsProvider to using ICU for generation of index labels, and remove custom KO and JA code. Add i18n test cases. Bug:7351596 Change-Id: I7ac25add8b29ff2c6c395f04a83b279b541e4125
2012-05-01am 38d33f70: am 1eabc582: Merge "GetPhonebookIndex: Fix handling for minor ↵Jean-Baptiste Queru
Japanese kana characters" * commit '38d33f70401037d36fcad72c4b4199890755a66b': GetPhonebookIndex: Fix handling for minor Japanese kana characters
2012-01-06Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: I5ffb58901712f4db93de474c30833a46ebb4bc7c
2012-01-03Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: Iad9bddb01ef0d9b28e3969b9f8dfbb2cc2830b30
2011-12-18GetPhonebookIndex: Fix handling for minor Japanese kana charactersYutaro Ogasawara
This adds minor Japanese kana character handling to meet the unicode collation algorithm. -Normalize digraphs (yori, koto) into first reading letter. -Treat dakuten, dot, onbiki, iteration marks as a symbol. -Add handling for minor small katakana letter. Signed-off-by: Yutaro Ogasawara <yutaro.ogasawara@gmail.com>
2011-07-07Allow _DELETE_FILE trigger to delete files on secondary external storageMike Lockwood
Change-Id: I5281dda013f909c050fda712d3a0816173df277d Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-12Revert "Allow _DELETE_FILE trigger to delete files in /data/media"Mike Lockwood
The media provider is now using the emulated /mnt/sdcard file system, so this change is no longer necessary. This reverts commit 439e88e7d09bfeac4690f2d9df6533955aa4fa88. Change-Id: Ied12275767e3a399d7e455ac2102527ccd8b888d
2011-01-06DO NOT MERGE. Adding a custom function to support legacy API compatibilityDmitri Plotnikov
Bug: 3210604 Change-Id: Ie65c053ec5178d6cd991f69a5a2b6d5d51938ade
2010-11-15Update to new Unicode.h includesKenny Root
Change-Id: Ibb9ca5833f9c0b3313ff0e9bc70348d268aaf4e2
2010-10-05Allow _DELETE_FILE trigger to delete files in /data/mediaMike Lockwood
Change-Id: I8a3f620cd6633f2be47ac05e17ea642f00b71e91 Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-15resolved conflicts for merge of 90f23688 to masterJesse Wilson
Change-Id: Ifa97db751da1aeeeb9d7450b04c909f0800ce140
2010-09-14Support sqlite on the dalvikvm host build.Jesse Wilson
Change-Id: I900daf7f205f8f666eac9c4070d2e5c99d85b3b3
2010-08-24Fix problem with const result from strchr() [DO NOT MERGE]Mike Lockwood
Needed for simulator build on newer Ubuntu distributions. Based on Ibb8cd3cdb4feae89a20eec56131e322f39721b1a Change-Id: Ie574888128265e026973a5ac88ede87730eda7d4
2010-08-18Put digits into an own segment with the title #Daniel Lehmann
Change-Id: I5f3ae179d388c417abd512974df22fd78a699354
2010-05-19Fix problem with const result from strchr()Mike Lockwood
Needed for simulator build on newer Ubuntu distributions. Change-Id: Ibb8cd3cdb4feae89a20eec56131e322f39721b1a Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-18Add PHONEBOOK_COLLATOR toward SQLite so that database users are able to sort ↵Daisuke Miyakawa
based on phonebook in ja_JP locale. In the future, we may able to use PHONEBOOK_COLLATOR in the other locales, but we don't use the other phonebook collator now since we cannot estimate how impactful the change is. Now we have a customized phonebook collator in Japanese and we need it in ContactsProvider, we'll use only the collator. Do not use this collator in the other packages and locales now. We may decide revert it in the near future after furter investigatons. Need to submit I4dd1b047 to make this change actually effective. Without the change, we will have a phonebook collator for "previous" locale, not the current one. Bug: 2514026 Bug: 2373557 Bug: 2373553 Change-Id: If6f548c0a80fe01e779b4dfc46f74224003f1798
2010-03-17Remove getPhoneticallySortableString() and its SQLite variant, both of which ↵Daisuke Miyakawa
are now obsolete because we already have icu's collator. Remain getNormalizedString() but remove SQLite variant since the C function is used internally. Change-Id: If1e4b8388087b78e0f6418ac3c7be4c23f67ee0e
2010-03-12Read external storage name from EXTERNAL_STORAGE variable.Ray Chen
Change-Id: I9d5bd02f23882dd85e91075e897150cafa33ffe5
2010-03-04Changing the phone book index for Japanese word "other"Dmitri Plotnikov
Bug: 2487471 Change-Id: I90cef4eb2468c0a58067df984ee98da438aa0e5a
2010-03-03Implementing traditional grouping of Hiragana characters in contacts listsDmitri Plotnikov
Bug: 2407129 Change-Id: I8d83f9012846f61484b76f718e8127090eba39ec