Revert^2 "[keystore2] Fix binder import path"
Import from the binder crate root instead of binder::public_api for
compatibility with the new crate structure.
Original change: Ia9695e5493bda965ca9a42989ec5a284407595ce
Test: m
Bug: 196056781
Change-Id: Ie6303a36a956cf73f317520a0e0a00ec4adbb47e
diff --git a/keystore2/src/operation.rs b/keystore2/src/operation.rs
index 7e08f4e..5da3b32 100644
--- a/keystore2/src/operation.rs
+++ b/keystore2/src/operation.rs
@@ -493,7 +493,7 @@
/// owner uid and returns a new Operation wrapped in a `std::sync::Arc`.
pub fn create_operation(
&self,
- km_op: binder::public_api::Strong<dyn IKeyMintOperation>,
+ km_op: binder::Strong<dyn IKeyMintOperation>,
owner: u32,
auth_info: AuthInfo,
forced: bool,
@@ -771,9 +771,7 @@
/// BnKeystoreOperation proxy object. It also enables
/// `BinderFeatures::set_requesting_sid` on the new interface, because
/// we need it for checking Keystore permissions.
- pub fn new_native_binder(
- operation: Arc<Operation>,
- ) -> binder::public_api::Strong<dyn IKeystoreOperation> {
+ pub fn new_native_binder(operation: Arc<Operation>) -> binder::Strong<dyn IKeystoreOperation> {
BnKeystoreOperation::new_binder(
Self { operation: Mutex::new(Some(operation)) },
BinderFeatures { set_requesting_sid: true, ..BinderFeatures::default() },
@@ -821,7 +819,7 @@
impl binder::Interface for KeystoreOperation {}
impl IKeystoreOperation for KeystoreOperation {
- fn updateAad(&self, aad_input: &[u8]) -> binder::public_api::Result<()> {
+ fn updateAad(&self, aad_input: &[u8]) -> binder::Result<()> {
let _wp = wd::watch_millis("IKeystoreOperation::updateAad", 500);
map_or_log_err(
self.with_locked_operation(
@@ -832,7 +830,7 @@
)
}
- fn update(&self, input: &[u8]) -> binder::public_api::Result<Option<Vec<u8>>> {
+ fn update(&self, input: &[u8]) -> binder::Result<Option<Vec<u8>>> {
let _wp = wd::watch_millis("IKeystoreOperation::update", 500);
map_or_log_err(
self.with_locked_operation(
@@ -846,7 +844,7 @@
&self,
input: Option<&[u8]>,
signature: Option<&[u8]>,
- ) -> binder::public_api::Result<Option<Vec<u8>>> {
+ ) -> binder::Result<Option<Vec<u8>>> {
let _wp = wd::watch_millis("IKeystoreOperation::finish", 500);
map_or_log_err(
self.with_locked_operation(
@@ -857,7 +855,7 @@
)
}
- fn abort(&self) -> binder::public_api::Result<()> {
+ fn abort(&self) -> binder::Result<()> {
let _wp = wd::watch_millis("IKeystoreOperation::abort", 500);
map_err_with(
self.with_locked_operation(