Transition keystore & vold to KM4.1
Test: CtsKeystoreTestCases
Change-Id: I1f59df5717eb831b029c5a37d834c3a8a3f56159
Merged-In: I1f59df5717eb831b029c5a37d834c3a8a3f56159
diff --git a/ng/include/AndroidKeymaster41Device.h b/ng/include/AndroidKeymaster41Device.h
index 3e2a77f..8e6d0f8 100644
--- a/ng/include/AndroidKeymaster41Device.h
+++ b/ng/include/AndroidKeymaster41Device.h
@@ -21,6 +21,7 @@
#include <android/hardware/keymaster/4.1/IKeymasterDevice.h>
#include <android/hardware/keymaster/4.1/types.h>
#include <hidl/Status.h>
+#include <keymasterV4_1/Operation.h>
#include "AndroidKeymaster4Device.h"
@@ -59,19 +60,6 @@
return static_cast<ErrorCode>(error_code);
}
-class Operation : public IOperation {
- public:
- Operation(OperationHandle handle) : handle_(handle) {}
-
- Return<void> getOperationChallenge(getOperationChallenge_cb _hidl_cb) override {
- _hidl_cb(convert(ErrorCode::OK), handle_);
- return Void();
- }
-
- private:
- OperationHandle handle_;
-};
-
class AndroidKeymaster41Device : public IKeymasterDevice, public V4_0::ng::AndroidKeymaster4Device {
using super = V4_0::ng::AndroidKeymaster4Device;
@@ -86,11 +74,12 @@
Return<void> beginOp(KeyPurpose purpose, const hidl_vec<uint8_t>& key,
const hidl_vec<KeyParameter>& inParams, const HardwareAuthToken& authToken,
beginOp_cb _hidl_cb) override {
- return super::begin(purpose, key, inParams, authToken,
- [&](auto hidl_err, auto hidl_params, auto hidl_handle) {
- _hidl_cb(convert(hidl_err), hidl_params,
- new Operation(hidl_handle));
- });
+ return super::begin(
+ purpose, key, inParams, authToken,
+ [&](auto hidl_err, auto hidl_params, auto hidl_handle) {
+ _hidl_cb(convert(hidl_err), hidl_params,
+ new ::android::hardware::keymaster::V4_1::support::Operation(hidl_handle));
+ });
}
Return<void> getHardwareInfo(super::getHardwareInfo_cb _hidl_cb) override {