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

Commit 5ad1ae77 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13764426 from d5d6b109 to 25Q4-release

Change-Id: I61370a8feab13915b6431ac59fb4cd7ba7084e4f
parents b2d0068a d5d6b109
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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.
        //
@@ -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
+3 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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.");
+1 −0
Original line number Diff line number Diff line
@@ -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",
+15 −0
Original line number Diff line number Diff line
@@ -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 {
@@ -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;
+4 −0
Original line number Diff line number Diff line
@@ -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