KeyChain: Refactor DB handling + tests

Extract database interaction in KeyChain to its own class,
GrantsDatabase.
Add Robolectric tests for the new class, to make sure existing
functionality works and is well-tested.

This change will make it easier to test new functionality that
will be added to the GrantsDatabase.

No functional changes.

Bug: 65624467
Test: New Robolectric unit tests, also tested on-device KeyChain isn't
broken. Run with 'm -j RunKeyChainRoboTests'

Change-Id: I2add6b18e0bfa65ad7a7c4a1ffdebf386b8cdc36
3 files changed
tree: 4f2e6a209ccebf2c8749c2119d54288ac5016dea
  1. res/
  2. robotests/
  3. src/
  4. support/
  5. tests/
  6. Android.mk
  7. AndroidManifest.xml