Merge "Delete KM1" am: 13274fa22d

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1849793

Change-Id: I955b0d66d14cf41c5b6a1696f66fd415f97be2e7
This commit is contained in:
Shawn Willden 2021-10-09 01:03:05 +00:00 committed by Automerger Merge Worker
commit 9c379e224f
4 changed files with 9 additions and 25 deletions

View file

@ -12,7 +12,7 @@ LOCAL_SRC_FILES := \
LOCAL_SHARED_LIBRARIES := \
liblog \
libsoftkeymasterdevice \
libpuresoftkeymasterdevice \
libcrypto \
libkeymaster_portable \
libpuresoftkeymasterdevice \

View file

@ -22,7 +22,6 @@
#include <log/log.h>
#include <AndroidKeymaster3Device.h>
#include <hardware/keymaster1.h>
#include <hardware/keymaster2.h>
#include <hardware/keymaster_defs.h>
@ -32,18 +31,6 @@ namespace keymaster {
namespace V3_0 {
namespace implementation {
static int get_keymaster1_dev(keymaster1_device_t** dev, const hw_module_t* mod) {
int rc = keymaster1_open(mod, dev);
if (rc) {
ALOGE("Error %d opening keystore keymaster1 device", rc);
if (*dev) {
(*dev)->common.close(&(*dev)->common);
*dev = nullptr;
}
}
return rc;
}
static int get_keymaster2_dev(keymaster2_device_t** dev, const hw_module_t* mod) {
int rc = keymaster2_open(mod, dev);
if (rc) {
@ -63,14 +50,8 @@ static IKeymasterDevice* createKeymaster3Device() {
return ::keymaster::ng::CreateKeymasterDevice();
}
if (mod->module_api_version < KEYMASTER_MODULE_API_VERSION_1_0) {
if (mod->module_api_version < KEYMASTER_MODULE_API_VERSION_2_0) {
return nullptr;
} else if (mod->module_api_version == KEYMASTER_MODULE_API_VERSION_1_0) {
keymaster1_device_t* dev = nullptr;
if (get_keymaster1_dev(&dev, mod)) {
return nullptr;
}
return ::keymaster::ng::CreateKeymasterDevice(dev);
} else {
keymaster2_device_t* dev = nullptr;
if (get_keymaster2_dev(&dev, mod)) {

View file

@ -36,7 +36,10 @@ cc_test {
static_libs: [
"android.hardware.keymaster@3.0",
"libcrypto_static",
"libsoftkeymasterdevice",
"libpuresoftkeymasterdevice",
],
test_suites: [
"general-tests",
"vts",
],
test_suites: ["general-tests", "vts"],
}

View file

@ -32,7 +32,7 @@ cc_benchmark {
static_libs: [
"android.hardware.keymaster@4.0",
"libkeymaster4support",
"libsoftkeymasterdevice",
"libchrome"
"libpuresoftkeymasterdevice",
"libchrome",
],
}