Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3927860 authored by Alice Wang's avatar Alice Wang Committed by Automerger Merge Worker
Browse files

Merge "[rpc_binder] Rename RpcClient to VsockRpcClient" am: 0c5d8ab8 am:...

Merge "[rpc_binder] Rename RpcClient to VsockRpcClient" am: 0c5d8ab8 am: ff41f525 am: fe3b66b0

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2259485



Change-Id: Idee278ebfdabb17e8451354f3d61eb3f3196c017
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7cdffb4d fe3b66b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ bool RunVsockRpcServerCallback(AIBinder* service, unsigned int port,
bool RunVsockRpcServerWithFactory(AIBinder* (*factory)(unsigned int cid, void* context),
                                  void* factoryContext, unsigned int port);

AIBinder* RpcClient(unsigned int cid, unsigned int port);
AIBinder* VsockRpcClient(unsigned int cid, unsigned int port);

// Connect to an RPC server with preconnected file descriptors.
//
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ bool RunVsockRpcServer(AIBinder* service, unsigned int port) {
    return RunVsockRpcServerCallback(service, port, nullptr, nullptr);
}

AIBinder* RpcClient(unsigned int cid, unsigned int port) {
AIBinder* VsockRpcClient(unsigned int cid, unsigned int port) {
    auto session = RpcSession::make();
    if (status_t status = session->setupVsockClient(cid, port); status != OK) {
        LOG(ERROR) << "Failed to set up vsock client with CID " << cid << " and port " << port
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ LIBBINDER_RPC_UNSTABLE_SHIM { # platform-only
  global:
    RunVsockRpcServer;
    RunVsockRpcServerCallback;
    RpcClient;
    VsockRpcClient;
    RpcPreconnectedClient;
  local:
    *;
+3 −3
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@ use std::os::{

/// Connects to an RPC Binder server over vsock.
pub fn get_vsock_rpc_service(cid: u32, port: u32) -> Option<SpIBinder> {
    // SAFETY: AIBinder returned by RpcClient has correct reference count, and the ownership can
    // safely be taken by new_spibinder.
    unsafe { new_spibinder(binder_rpc_unstable_bindgen::RpcClient(cid, port)) }
    // SAFETY: AIBinder returned by VsockRpcClient has correct reference count,
    // and the ownership can safely be taken by new_spibinder.
    unsafe { new_spibinder(binder_rpc_unstable_bindgen::VsockRpcClient(cid, port)) }
}

/// Connects to an RPC Binder server for a particular interface over vsock.