Mark permission usage by ContactsProvider.

Required so that CallLogProvider can READ the shadow call log and then
write to itself.

Flag: Unflagged due to regression.
Test: Manual regression testing.
Bug: 352400424
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:35bfa369c14a46e646bd04bdc0bc67b47e444e65)
Merged-In: Ie625a067f1bc1e386677bc791a07cdcd6b3b5f0f
Change-Id: Ie625a067f1bc1e386677bc791a07cdcd6b3b5f0f
1 file changed
tree: b63c4a95ffb69ece0701d59d7a0a3ebf8702f207
  1. qc/
  2. res/
  3. src/
  4. test_common/
  5. tests/
  6. tools/
  7. Android.bp
  8. AndroidManifest.xml
  9. CleanSpec.mk
  10. contactsproviderutils.sh
  11. logging.sh
  12. OWNERS
  13. PREUPLOAD.cfg
  14. proguard.flags
  15. README-tests.md
  16. README.md
  17. TEST_MAPPING
README.md

Debugging Tools

Enable all verbose logs

Running ./logging.sh will enable all verbose logs for the queries in the provider. More details in the script itself.

Querying the database

There are 2 different ways to easily query the database, qc and contatcsproviderutils.sh.

QC usage

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.

contactsproviderutils.sh usage

This script downlaods the database locally and logins into a local version. It is also possible to push any change back to the device.

  • Add tools to path
    source contactsproviderutils.sh
    
  • Pull contacts2.db and query:
    sqlite3-pull
    
    This will open a sql terminal with rlwrap which can be easily used for queries.
  • Pull contacts2.db and query with a graphical interface:
    sqlitebrowser-pull
    
  • Push local updates to the device:
    sqlite3-push