Keystore 2.0: Revise database.
* Make grants persistent.
* Moved some utility functions to db_utils.rs.
* KeystoreDB::new() now takes a path argument that indicates where the
the database files are to be expected.
* A new test module test::utils.rs introduces TempDir which creates a
new temporary directory that is cleaned up with all of its content
when the TempDir opject is dropped.
Test: keystore2_test
Change-Id: I056c404fd9d592ddc8b531394b1c6cc17a0fd736
diff --git a/keystore2/Android.bp b/keystore2/Android.bp
index e63a469..7bd3c77 100644
--- a/keystore2/Android.bp
+++ b/keystore2/Android.bp
@@ -49,6 +49,7 @@
"liblazy_static",
"liblibsqlite3_sys",
"liblog_rust",
+ "librand",
"librusqlite",
"libthiserror",
],