Revert^2 "[binder_common] Update binder import path"
Import from the binder crate root instead of binder::public_api for compatibility with the new crate structure. Relanding change: Ia37ec9d1ec9afea8ff61fecb06d13bfb8a4f65cf Test: m Bug: 196056781 Change-Id: I35e1d9268929f35d3ce494c2833f39f708170b96
This commit is contained in:
parent
5742fd1145
commit
44fd9bcfd7
|
@ -17,7 +17,7 @@
|
|||
//! Rust API for lazy (aka dynamic) AIDL services.
|
||||
//! See https://source.android.com/devices/architecture/aidl/dynamic-aidl.
|
||||
|
||||
use binder::public_api::force_lazy_services_persist;
|
||||
use binder::force_lazy_services_persist;
|
||||
use lazy_static::lazy_static;
|
||||
use std::sync::Mutex;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ pub mod lazy_service;
|
|||
pub mod rpc_client;
|
||||
pub mod rpc_server;
|
||||
|
||||
use binder::public_api::{ExceptionCode, Status};
|
||||
use binder::{ExceptionCode, Status};
|
||||
use std::ffi::CString;
|
||||
|
||||
/// Constructs a new Binder error `Status` with the given `ExceptionCode` and message.
|
||||
|
|
|
@ -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,
|
||||
) -> binder::Result<Strong<T>> {
|
||||
) -> Result<Strong<T>, StatusCode> {
|
||||
// SAFETY: AIBinder returned by RpcClient has correct reference count, and the ownership can be
|
||||
// safely taken by new_spibinder.
|
||||
let ibinder = unsafe {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
//! Helper for converting Error types to what Binder expects
|
||||
|
||||
use anyhow::Result;
|
||||
use binder::public_api::{ExceptionCode, Result as BinderResult};
|
||||
use binder::{ExceptionCode, Result as BinderResult};
|
||||
use binder_common::new_binder_exception;
|
||||
use log::warn;
|
||||
use std::fmt::Debug;
|
||||
|
|
Loading…
Reference in New Issue