#include "include/private/dvr/display_manager_client.h" #include #include #include #include using android::pdx::ErrorStatus; using android::pdx::LocalChannelHandle; using android::pdx::Transaction; namespace android { namespace dvr { namespace display { DisplayManagerClient::DisplayManagerClient() : BASE(pdx::default_transport::ClientChannelFactory::Create( DisplayManagerProtocol::kClientPath)) {} DisplayManagerClient::~DisplayManagerClient() {} pdx::Status> DisplayManagerClient::GetSurfaceState() { auto status = InvokeRemoteMethod(); if (!status) { ALOGE( "DisplayManagerClient::GetSurfaceState: Failed to get surface info: %s", status.GetErrorMessage().c_str()); } return status; } pdx::Status> DisplayManagerClient::GetSurfaceQueue(int surface_id, int queue_id) { auto status = InvokeRemoteMethod( surface_id, queue_id); if (!status) { ALOGE( "DisplayManagerClient::GetSurfaceQueue: Failed to get queue for " "surface_id=%d queue_id=%d: %s", surface_id, queue_id, status.GetErrorMessage().c_str()); return status.error_status(); } return {ConsumerQueue::Import(status.take())}; } } // namespace display } // namespace dvr } // namespace android