| commit | 32b9812c0e19214f822c3eaf6511ce2e3219bbc2 | [log] [tgz] |
|---|---|---|
| author | Liefu Liu <liefuliu@google.com> | Wed Aug 13 15:38:18 2025 -0700 |
| committer | Liefu Liu <liefuliu@google.com> | Thu Aug 14 13:06:44 2025 -0700 |
| tree | 771a7d66cba4ed8af61ddcffe8e5e292726390eb | |
| parent | 6b93755ab09ffffc167e6fcd2ea0e144c06bb8af [diff] |
Bypass the initialization of account attributes on the accounts whose attribute has been set by App (i.e. has_owner_set_attributes set to 1) If the App has overridden account attributes before, ContactsProvider should stick with the App overridden ones and skip initializating of account attributes. Bug: 430941895 Flag: android.provider.new_account_attributes_api_enabled Test: atest AccountAttributeManagerTet new file: src/com/android/providers/contacts/AccountAttributesInfo.java modified: src/com/android/providers/contacts/AccountAttributesManager.java modified: src/com/android/providers/contacts/ContactsDatabaseHelper.java modified: tests/src/com/android/providers/contacts/AccountAttributesManagerTest.java modified: tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java Change-Id: Iefc90399864b805a86efd98dc6742e33ee2b2885
Running ./logging.sh will enable all verbose logs for the queries in the provider. More details in the script itself.
There are 2 different ways to easily query the database, qc and contatcsproviderutils.sh.
qc queries the deivce directly. For usage, append the query in single quotes after the command:
e.g.
qc/qc 'select * from raw_contacts'
or to get all the tables
qc/qc '.tables'
QC support SQLite language, but it might have some limitations working with complex nested queries.
This script downlaods the database locally and logins into a local version. It is also possible to push any change back to the device.
source contactsproviderutils.sh
contacts2.db and query:sqlite3-pullThis will open a sql terminal with
rlwrap which can be easily used for queries.contacts2.db and query with a graphical interface:sqlitebrowser-pull
sqlite3-push