Revert "[binder_common] Update binder import path"
Revert "[binder] Expose public Rust API at crate top level"
Revert "[libprofcollectd] Fix binder import path"
Revert submission 1797473-binder_rs-public_api
Reason for revert: Build breakage
Reverted Changes:
Ia37ec9d1e:[binder_common] Update binder import path
Ie6b4a40d7:Update Rust binder import paths
Ia9695e549:[keystore2] Fix binder import path
I811426fa7:[binder] Expose public Rust API at crate top level...
I773767a3a:[libprofcollectd] Fix binder import path
Change-Id: Iea286e143ddcaef673fa34a4f76de45f751f1c9f
diff --git a/binder_common/lazy_service.rs b/binder_common/lazy_service.rs
index 9d605b6..a2b85db 100644
--- a/binder_common/lazy_service.rs
+++ b/binder_common/lazy_service.rs
@@ -17,7 +17,7 @@
//! Rust API for lazy (aka dynamic) AIDL services.
//! See https://source.android.com/devices/architecture/aidl/dynamic-aidl.
-use binder::force_lazy_services_persist;
+use binder::public_api::force_lazy_services_persist;
use lazy_static::lazy_static;
use std::sync::Mutex;
diff --git a/binder_common/lib.rs b/binder_common/lib.rs
index fd81da5..fa91f5a 100644
--- a/binder_common/lib.rs
+++ b/binder_common/lib.rs
@@ -20,7 +20,7 @@
pub mod rpc_client;
pub mod rpc_server;
-use binder::{ExceptionCode, Status};
+use binder::public_api::{ExceptionCode, Status};
use std::ffi::CString;
/// Constructs a new Binder error `Status` with the given `ExceptionCode` and message.
diff --git a/binder_common/rpc_client.rs b/binder_common/rpc_client.rs
index 1aabe84..262a689 100644
--- a/binder_common/rpc_client.rs
+++ b/binder_common/rpc_client.rs
@@ -16,14 +16,14 @@
//! Helpers for implementing an RPC Binder client.
+use binder::public_api::{StatusCode, Strong};
use binder::unstable_api::{new_spibinder, AIBinder};
-use binder::{StatusCode, Strong};
/// Connects to a binder RPC server.
pub fn connect_rpc_binder<T: binder::FromIBinder + ?Sized>(
cid: u32,
port: u32,
-) -> Result<Strong<T>, StatusCode> {
+) -> binder::Result<Strong<T>> {
// SAFETY: AIBinder returned by RpcClient has correct reference count, and the ownership can be
// safely taken by new_spibinder.
let ibinder = unsafe {
diff --git a/binder_common/rpc_server.rs b/binder_common/rpc_server.rs
index 5c9d2a0..36075cf 100644
--- a/binder_common/rpc_server.rs
+++ b/binder_common/rpc_server.rs
@@ -16,8 +16,8 @@
//! Helpers for implementing an RPC Binder server.
+use binder::public_api::SpIBinder;
use binder::unstable_api::AsNative;
-use binder::SpIBinder;
use std::os::raw;
/// Run a binder RPC server, serving the supplied binder service implementation on the given vsock
diff --git a/compos/common/binder.rs b/compos/common/binder.rs
index ae857e0..6bd3957 100644
--- a/compos/common/binder.rs
+++ b/compos/common/binder.rs
@@ -17,7 +17,7 @@
//! Helper for converting Error types to what Binder expects
use anyhow::Result;
-use binder::{ExceptionCode, Result as BinderResult};
+use binder::public_api::{ExceptionCode, Result as BinderResult};
use binder_common::new_binder_exception;
use log::warn;
use std::fmt::Debug;