Add empty keystore2 crate
Adds an empty crate with a build config for libkeystore2 and the
keystore2 test.
Also add a TEST_MAPPING file setting up keystore2_test as presubmit
test.
Bug: 160623310
Test: keystore2_test
Change-Id: I2cda9a74a43422453cf5d1d44867107c9f0292bf
diff --git a/keystore2/Android.bp b/keystore2/Android.bp
new file mode 100644
index 0000000..5df94cb
--- /dev/null
+++ b/keystore2/Android.bp
@@ -0,0 +1,27 @@
+// Copyright 2020, The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+rust_library {
+ name: "libkeystore2",
+ crate_name: "keystore2",
+ srcs: ["src/lib.rs"],
+}
+
+rust_test {
+ name: "keystore2_test",
+ crate_name: "keystore2_test",
+ srcs: ["src/lib.rs"],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
+}
diff --git a/keystore2/TEST_MAPPING b/keystore2/TEST_MAPPING
new file mode 100644
index 0000000..70e3175
--- /dev/null
+++ b/keystore2/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+ "presubmit": [
+ {
+ "name": "keystore2_test"
+ }
+ ]
+}
diff --git a/keystore2/src/lib.rs b/keystore2/src/lib.rs
new file mode 100644
index 0000000..97c1839
--- /dev/null
+++ b/keystore2/src/lib.rs
@@ -0,0 +1,15 @@
+// Copyright 2020, The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//! This crate implements the Android Keystore 2.0 service.