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