Loading cmds/evemu-record/evdev.rs +2 −2 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ impl Device { } pub fn properties_bitmap(&self) -> Result<Vec<u8>, nix::errno::Errno> { let buf_size = (INPUT_PROP_CNT + 7) / 8; let buf_size = INPUT_PROP_CNT.div_ceil(8); // SAFETY: // We know that fd is a valid file descriptor as it comes from a File that we have open. // Loading @@ -211,7 +211,7 @@ impl Device { } pub fn bitmap_for_event_type(&self, event_type: EventType) -> nix::Result<Vec<u8>> { let buf_size = (event_type.code_count() + 7) / 8; let buf_size = event_type.code_count().div_ceil(8); let mut buf = vec![0; buf_size]; // The EVIOCGBIT ioctl can't be bound using ioctl_read_buf! like the others, since it uses Loading libs/binder/RpcServer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -130,6 +130,9 @@ status_t RpcServer::setupInetServer(const char* address, unsigned int port, } void RpcServer::setMaxThreads(size_t threads) { #ifdef BINDER_RPC_SINGLE_THREADED LOG_ALWAYS_FATAL_IF(threads > 1, "Cannot set max threads > 1 in single-threaded mode"); #endif // BINDER_RPC_SINGLE_THREADED LOG_ALWAYS_FATAL_IF(threads <= 0, "RpcServer is useless without threads"); LOG_ALWAYS_FATAL_IF(mJoinThreadRunning, "Cannot set max threads while running"); mMaxThreads = threads; Loading Loading @@ -260,7 +263,6 @@ status_t RpcServer::recvmsgSocketConnection(const RpcServer& server, RpcTranspor } void RpcServer::join() { { RpcMutexLockGuard _l(mLock); LOG_ALWAYS_FATAL_IF(!mServer.fd.ok(), "RpcServer must be setup to join."); Loading libs/dumputils/dump_utils.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ static const std::vector<std::string> aidl_interfaces_to_dump { "android.hardware.graphics.composer3.IComposer", "android.hardware.health.IHealth", "android.hardware.input.processor.IInputProcessor", "android.hardware.media.c2.IComponentStore", "android.hardware.neuralnetworks.IDevice", "android.hardware.power.IPower", "android.hardware.power.stats.IPowerStats", Loading libs/gui/Flags.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <gui/IGraphicBufferProducer.h> #include <gui/Surface.h> #include <gui/view/Surface.h> #include <system/window.h> namespace android { namespace flagtools { Loading Loading @@ -78,6 +79,20 @@ sp<SurfaceType> convertParcelableSurfaceTypeToSurface(const ParcelableSurfaceTyp } } // namespace flagtools namespace mediaflagtools { sp<MediaSurfaceType> nativeWindowToSurfaceType(ANativeWindow* anw) { if (anw == nullptr) { return nullptr; } sp<Surface> surface = Surface::from(anw); #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION) return surface; #else return surface->getIGraphicBufferProducer(); #endif } sp<MediaSurfaceType> igbpToSurfaceType(const sp<IGraphicBufferProducer>& igbp) { if (igbp == nullptr) { return nullptr; Loading libs/gui/Surface.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,10 @@ Surface::~Surface() { #endif // !defined(NO_BINDER) } sp<Surface> Surface::from(ANativeWindow* anw) { return sp<Surface>::fromExisting(static_cast<Surface*>(anw)); } #ifndef NO_BINDER sp<ISurfaceComposer> Surface::composerService() const { return ComposerService::getComposerService(); Loading Loading
cmds/evemu-record/evdev.rs +2 −2 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ impl Device { } pub fn properties_bitmap(&self) -> Result<Vec<u8>, nix::errno::Errno> { let buf_size = (INPUT_PROP_CNT + 7) / 8; let buf_size = INPUT_PROP_CNT.div_ceil(8); // SAFETY: // We know that fd is a valid file descriptor as it comes from a File that we have open. // Loading @@ -211,7 +211,7 @@ impl Device { } pub fn bitmap_for_event_type(&self, event_type: EventType) -> nix::Result<Vec<u8>> { let buf_size = (event_type.code_count() + 7) / 8; let buf_size = event_type.code_count().div_ceil(8); let mut buf = vec![0; buf_size]; // The EVIOCGBIT ioctl can't be bound using ioctl_read_buf! like the others, since it uses Loading
libs/binder/RpcServer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -130,6 +130,9 @@ status_t RpcServer::setupInetServer(const char* address, unsigned int port, } void RpcServer::setMaxThreads(size_t threads) { #ifdef BINDER_RPC_SINGLE_THREADED LOG_ALWAYS_FATAL_IF(threads > 1, "Cannot set max threads > 1 in single-threaded mode"); #endif // BINDER_RPC_SINGLE_THREADED LOG_ALWAYS_FATAL_IF(threads <= 0, "RpcServer is useless without threads"); LOG_ALWAYS_FATAL_IF(mJoinThreadRunning, "Cannot set max threads while running"); mMaxThreads = threads; Loading Loading @@ -260,7 +263,6 @@ status_t RpcServer::recvmsgSocketConnection(const RpcServer& server, RpcTranspor } void RpcServer::join() { { RpcMutexLockGuard _l(mLock); LOG_ALWAYS_FATAL_IF(!mServer.fd.ok(), "RpcServer must be setup to join."); Loading
libs/dumputils/dump_utils.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ static const std::vector<std::string> aidl_interfaces_to_dump { "android.hardware.graphics.composer3.IComposer", "android.hardware.health.IHealth", "android.hardware.input.processor.IInputProcessor", "android.hardware.media.c2.IComponentStore", "android.hardware.neuralnetworks.IDevice", "android.hardware.power.IPower", "android.hardware.power.stats.IPowerStats", Loading
libs/gui/Flags.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <gui/IGraphicBufferProducer.h> #include <gui/Surface.h> #include <gui/view/Surface.h> #include <system/window.h> namespace android { namespace flagtools { Loading Loading @@ -78,6 +79,20 @@ sp<SurfaceType> convertParcelableSurfaceTypeToSurface(const ParcelableSurfaceTyp } } // namespace flagtools namespace mediaflagtools { sp<MediaSurfaceType> nativeWindowToSurfaceType(ANativeWindow* anw) { if (anw == nullptr) { return nullptr; } sp<Surface> surface = Surface::from(anw); #if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_MEDIA_MIGRATION) return surface; #else return surface->getIGraphicBufferProducer(); #endif } sp<MediaSurfaceType> igbpToSurfaceType(const sp<IGraphicBufferProducer>& igbp) { if (igbp == nullptr) { return nullptr; Loading
libs/gui/Surface.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,10 @@ Surface::~Surface() { #endif // !defined(NO_BINDER) } sp<Surface> Surface::from(ANativeWindow* anw) { return sp<Surface>::fromExisting(static_cast<Surface*>(anw)); } #ifndef NO_BINDER sp<ISurfaceComposer> Surface::composerService() const { return ComposerService::getComposerService(); Loading