Loading cmds/atrace/atrace.rc +7 −4 Original line number Diff line number Diff line Loading @@ -63,10 +63,6 @@ on late-init chmod 0666 /sys/kernel/tracing/events/cpuhp/cpuhp_exit/enable chmod 0666 /sys/kernel/debug/tracing/events/cpuhp/cpuhp_pause/enable chmod 0666 /sys/kernel/tracing/events/cpuhp/cpuhp_pause/enable chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_work_period/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_work_period/enable chmod 0666 /sys/kernel/debug/tracing/events/power/suspend_resume/enable chmod 0666 /sys/kernel/tracing/events/power/suspend_resume/enable chmod 0666 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable Loading Loading @@ -439,6 +435,13 @@ on late-init && property:ro.boot.hypervisor.vm.supported=1 chmod 0440 /sys/kernel/debug/tracing/hyp/events/hyp/host_mem_abort/id chmod 0440 /sys/kernel/tracing/hyp/events/hyp/host_mem_abort/id # Ensure correct permissions on GPU related events on late-fs chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_work_period/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_work_period/enable on property:persist.debug.atrace.boottrace=1 start boottrace Loading cmds/servicemanager/rpc_servicemanager/rpc_servicemanager.rs +6 −20 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ use rpc_servicemanager_aidl::aidl::android::os::IRpcProvider::{ IRpcProvider, ServiceConnectionInfo::ServiceConnectionInfo, }; use rpcbinder::{FileDescriptorTransportMode, RpcServer}; use rustutils::sockets::{android_get_control_socket, SocketError}; use rustutils::sockets::android_get_control_socket; use servicemanager_aidl::aidl::android::os::IServiceManager::{ BnServiceManager, CallerContext::CallerContext, IServiceManager, }; Loading @@ -30,7 +30,6 @@ use servicemanager_aidl::aidl::android::os::{ ConnectionInfo::ConnectionInfo, IClientCallback::IClientCallback, IServiceCallback::IServiceCallback, Service::Service, ServiceDebugInfo::ServiceDebugInfo, }; use std::os::unix::io::OwnedFd; use vsock::VMADDR_CID_HOST; // Name of the socket that libbinder is expecting IServiceManager to be served from Loading Loading @@ -152,33 +151,20 @@ impl RpcServiceManager { } } /// Get the Unix Domain Socket file descriptor for RPC_SERVICEMANAGER_UDS_NAME /// /// A client might need to do this in order to get an FD with the FD_CLOEXEC flag set before /// it forks any other processes. pub fn get_default_rpc_servicemanager_uds_fd() -> Result<OwnedFd, SocketError> { android_get_control_socket(RPC_SERVICEMANAGER_UDS_NAME) } /// Registers the `IServiceManager` service. /// /// servicemanager_fd is an optional argument to provide the Unix Domain Socked file /// descriptor to use for the server. If None is provided, then it will use the default /// of RPC_SERVICEMANAGER_UDS_NAME to get the FD. pub fn register_rpc_servicemanager( provider_service: Strong<dyn IRpcProvider>, servicemanager_fd: Option<OwnedFd>, ) -> Result<()> { pub fn register_rpc_servicemanager(provider_service: Strong<dyn IRpcProvider>) -> Result<()> { let rpc_servicemanager_binder = BnServiceManager::new_binder( RpcServiceManager::new(provider_service), BinderFeatures::default(), ); let servicemanager_fd = match servicemanager_fd { Some(fd) => fd, None => android_get_control_socket(RPC_SERVICEMANAGER_UDS_NAME)?, }; let server = RpcServer::new_bound_socket(rpc_servicemanager_binder.as_binder(), servicemanager_fd)?; let server = RpcServer::new_bound_socket( rpc_servicemanager_binder.as_binder(), android_get_control_socket(RPC_SERVICEMANAGER_UDS_NAME)?, )?; // Required for the FD being passed through libbinder's accessor binder server.set_supported_file_descriptor_transport_modes(&[FileDescriptorTransportMode::Unix]); Loading include/android/sensor.h +7 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,13 @@ enum { * relative to true north in degrees. */ ASENSOR_TYPE_HEADING = 42, /** * {@link ASENSOR_TYPE_MOISTURE_INTRUSION} * reporting-mode: on-change * * A moisture sensor that detects water intrusion within the chassis of a device */ ASENSOR_TYPE_MOISTURE_INTRUSION = 43, }; /** Loading include/input/DisplayTopologyGraph.h +6 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <android-base/result.h> #include <ftl/enum.h> #include <ui/FloatRect.h> #include <ui/LogicalDisplayId.h> #include <cinttypes> Loading Loading @@ -58,6 +59,7 @@ struct DisplayTopologyGraph { ui::LogicalDisplayId primaryDisplayId = ui::LogicalDisplayId::INVALID; std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>> graph; std::unordered_map<ui::LogicalDisplayId, int> displaysDensity; std::unordered_map<ui::LogicalDisplayId, FloatRect> boundsInGlobalDp; DisplayTopologyGraph() = default; std::string dump() const; Loading @@ -68,14 +70,16 @@ struct DisplayTopologyGraph { ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap, std::unordered_map<ui::LogicalDisplayId, FloatRect>&& boundsInGlobalDpMap); private: DisplayTopologyGraph( ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap, std::unordered_map<ui::LogicalDisplayId, FloatRect>&& boundsInGlobalDp); }; } // namespace android libs/binder/RpcServer.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ bool RpcServer::shutdown() { } while (mJoinThreadRunning || !mConnectingThreads.empty() || !mSessions.empty()) { if (std::cv_status::timeout == mShutdownCv.wait_for(_l, std::chrono::seconds(1))) { if (mShutdownCv.wait_for(_l, std::chrono::seconds(1)) == RpcCvStatus::timeout) { ALOGE("Waiting for RpcServer to shut down (1s w/o progress). Join thread running: %d, " "Connecting threads: " "%zu, Sessions: %zu. Is your server deadlocked?", Loading Loading @@ -535,11 +535,7 @@ void RpcServer::establishConnection( } } if (!session->setForServer(server, sp<RpcServer::EventListener>::fromExisting( static_cast<RpcServer::EventListener*>( server.get())), sessionId, sessionSpecificRoot)) { if (!session->setForServer(server, server, sessionId, sessionSpecificRoot)) { ALOGE("Failed to attach server to session"); return; } Loading Loading
cmds/atrace/atrace.rc +7 −4 Original line number Diff line number Diff line Loading @@ -63,10 +63,6 @@ on late-init chmod 0666 /sys/kernel/tracing/events/cpuhp/cpuhp_exit/enable chmod 0666 /sys/kernel/debug/tracing/events/cpuhp/cpuhp_pause/enable chmod 0666 /sys/kernel/tracing/events/cpuhp/cpuhp_pause/enable chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_work_period/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_work_period/enable chmod 0666 /sys/kernel/debug/tracing/events/power/suspend_resume/enable chmod 0666 /sys/kernel/tracing/events/power/suspend_resume/enable chmod 0666 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable Loading Loading @@ -439,6 +435,13 @@ on late-init && property:ro.boot.hypervisor.vm.supported=1 chmod 0440 /sys/kernel/debug/tracing/hyp/events/hyp/host_mem_abort/id chmod 0440 /sys/kernel/tracing/hyp/events/hyp/host_mem_abort/id # Ensure correct permissions on GPU related events on late-fs chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_frequency/enable chmod 0666 /sys/kernel/debug/tracing/events/power/gpu_work_period/enable chmod 0666 /sys/kernel/tracing/events/power/gpu_work_period/enable on property:persist.debug.atrace.boottrace=1 start boottrace Loading
cmds/servicemanager/rpc_servicemanager/rpc_servicemanager.rs +6 −20 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ use rpc_servicemanager_aidl::aidl::android::os::IRpcProvider::{ IRpcProvider, ServiceConnectionInfo::ServiceConnectionInfo, }; use rpcbinder::{FileDescriptorTransportMode, RpcServer}; use rustutils::sockets::{android_get_control_socket, SocketError}; use rustutils::sockets::android_get_control_socket; use servicemanager_aidl::aidl::android::os::IServiceManager::{ BnServiceManager, CallerContext::CallerContext, IServiceManager, }; Loading @@ -30,7 +30,6 @@ use servicemanager_aidl::aidl::android::os::{ ConnectionInfo::ConnectionInfo, IClientCallback::IClientCallback, IServiceCallback::IServiceCallback, Service::Service, ServiceDebugInfo::ServiceDebugInfo, }; use std::os::unix::io::OwnedFd; use vsock::VMADDR_CID_HOST; // Name of the socket that libbinder is expecting IServiceManager to be served from Loading Loading @@ -152,33 +151,20 @@ impl RpcServiceManager { } } /// Get the Unix Domain Socket file descriptor for RPC_SERVICEMANAGER_UDS_NAME /// /// A client might need to do this in order to get an FD with the FD_CLOEXEC flag set before /// it forks any other processes. pub fn get_default_rpc_servicemanager_uds_fd() -> Result<OwnedFd, SocketError> { android_get_control_socket(RPC_SERVICEMANAGER_UDS_NAME) } /// Registers the `IServiceManager` service. /// /// servicemanager_fd is an optional argument to provide the Unix Domain Socked file /// descriptor to use for the server. If None is provided, then it will use the default /// of RPC_SERVICEMANAGER_UDS_NAME to get the FD. pub fn register_rpc_servicemanager( provider_service: Strong<dyn IRpcProvider>, servicemanager_fd: Option<OwnedFd>, ) -> Result<()> { pub fn register_rpc_servicemanager(provider_service: Strong<dyn IRpcProvider>) -> Result<()> { let rpc_servicemanager_binder = BnServiceManager::new_binder( RpcServiceManager::new(provider_service), BinderFeatures::default(), ); let servicemanager_fd = match servicemanager_fd { Some(fd) => fd, None => android_get_control_socket(RPC_SERVICEMANAGER_UDS_NAME)?, }; let server = RpcServer::new_bound_socket(rpc_servicemanager_binder.as_binder(), servicemanager_fd)?; let server = RpcServer::new_bound_socket( rpc_servicemanager_binder.as_binder(), android_get_control_socket(RPC_SERVICEMANAGER_UDS_NAME)?, )?; // Required for the FD being passed through libbinder's accessor binder server.set_supported_file_descriptor_transport_modes(&[FileDescriptorTransportMode::Unix]); Loading
include/android/sensor.h +7 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,13 @@ enum { * relative to true north in degrees. */ ASENSOR_TYPE_HEADING = 42, /** * {@link ASENSOR_TYPE_MOISTURE_INTRUSION} * reporting-mode: on-change * * A moisture sensor that detects water intrusion within the chassis of a device */ ASENSOR_TYPE_MOISTURE_INTRUSION = 43, }; /** Loading
include/input/DisplayTopologyGraph.h +6 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <android-base/result.h> #include <ftl/enum.h> #include <ui/FloatRect.h> #include <ui/LogicalDisplayId.h> #include <cinttypes> Loading Loading @@ -58,6 +59,7 @@ struct DisplayTopologyGraph { ui::LogicalDisplayId primaryDisplayId = ui::LogicalDisplayId::INVALID; std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>> graph; std::unordered_map<ui::LogicalDisplayId, int> displaysDensity; std::unordered_map<ui::LogicalDisplayId, FloatRect> boundsInGlobalDp; DisplayTopologyGraph() = default; std::string dump() const; Loading @@ -68,14 +70,16 @@ struct DisplayTopologyGraph { ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap, std::unordered_map<ui::LogicalDisplayId, FloatRect>&& boundsInGlobalDpMap); private: DisplayTopologyGraph( ui::LogicalDisplayId primaryDisplay, std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>>&& adjacencyGraph, std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap); std::unordered_map<ui::LogicalDisplayId, int>&& displaysDensityMap, std::unordered_map<ui::LogicalDisplayId, FloatRect>&& boundsInGlobalDp); }; } // namespace android
libs/binder/RpcServer.cpp +2 −6 Original line number Diff line number Diff line Loading @@ -340,7 +340,7 @@ bool RpcServer::shutdown() { } while (mJoinThreadRunning || !mConnectingThreads.empty() || !mSessions.empty()) { if (std::cv_status::timeout == mShutdownCv.wait_for(_l, std::chrono::seconds(1))) { if (mShutdownCv.wait_for(_l, std::chrono::seconds(1)) == RpcCvStatus::timeout) { ALOGE("Waiting for RpcServer to shut down (1s w/o progress). Join thread running: %d, " "Connecting threads: " "%zu, Sessions: %zu. Is your server deadlocked?", Loading Loading @@ -535,11 +535,7 @@ void RpcServer::establishConnection( } } if (!session->setForServer(server, sp<RpcServer::EventListener>::fromExisting( static_cast<RpcServer::EventListener*>( server.get())), sessionId, sessionSpecificRoot)) { if (!session->setForServer(server, server, sessionId, sessionSpecificRoot)) { ALOGE("Failed to attach server to session"); return; } Loading