Use new binder exception constructors moved from binder_common.
Bug: 234019127
Test: atest compos_key_tests MicrodroidHostTestCases MicrodroidTestApp
Change-Id: I938c9d0ebae90c933c9a7ee8c27e9ecb0cc3e5fa
diff --git a/compos/common/binder.rs b/compos/common/binder.rs
index 45139f3..59726c0 100644
--- a/compos/common/binder.rs
+++ b/compos/common/binder.rs
@@ -16,8 +16,7 @@
//! Helper for converting Error types to what Binder expects
-use android_system_virtualizationservice::binder::{ExceptionCode, Result as BinderResult};
-use binder_common::new_binder_exception;
+use android_system_virtualizationservice::binder::{Result as BinderResult, Status};
use log::warn;
use std::fmt::Debug;
@@ -28,6 +27,6 @@
result.map_err(|e| {
let message = format!("{:?}", e);
warn!("Returning binder error: {}", &message);
- new_binder_exception(ExceptionCode::SERVICE_SPECIFIC, message)
+ Status::new_service_specific_error_str(-1, Some(message))
})
}