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

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

Snap for 11876238 from 158510ed to 24Q3-release

Change-Id: I465486f9c34df693c634690cba34eb93ffb8cdb8
parents 70019733 158510ed
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */

#define LOG_TAG "BpBinder"
#define ATRACE_TAG ATRACE_TAG_AIDL
//#define LOG_NDEBUG 0

#include <binder/BpBinder.h>
@@ -26,6 +27,12 @@

#include <stdio.h>

#ifndef __TRUSTY__
#include <cutils/trace.h>
#else
#define ATRACE_INT(...)
#endif

#include "BuildFlags.h"
#include "file.h"

@@ -209,6 +216,7 @@ sp<BpBinder> BpBinder::create(int32_t handle) {
        sTrackingMap[trackedUid]++;
    }
    uint32_t numProxies = sBinderProxyCount.fetch_add(1, std::memory_order_relaxed);
    ATRACE_INT("binder_proxies", numProxies);
    uint32_t numLastWarned = sBinderProxyCountWarned.load(std::memory_order_relaxed);
    uint32_t numNextWarn = numLastWarned + kBinderProxyCountWarnInterval;
    if (numProxies >= numNextWarn) {
@@ -632,8 +640,8 @@ BpBinder::~BpBinder() {
            }
        }
    }
    --sBinderProxyCount;

    [[maybe_unused]] uint32_t numProxies = --sBinderProxyCount;
    ATRACE_INT("binder_proxies", numProxies);
    if (ipc) {
        ipc->expungeHandle(binderHandle(), this);
        ipc->decWeakHandle(binderHandle());
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

#include <inttypes.h>
#include <unistd.h>
#include <condition_variable>

#include <android-base/properties.h>
#include <android/os/BnServiceCallback.h>
@@ -642,7 +643,7 @@ public:

protected:
    // Override realGetService for ServiceManagerShim::waitForService.
    Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) {
    Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) override {
        *_aidl_return = getDeviceService({"-g", name}, mOptions);
        return Status::ok();
    }
+1 −1
Original line number Diff line number Diff line
@@ -2768,7 +2768,7 @@ void Parcel::ipcSetDataReference(const uint8_t* data, size_t dataSize, const bin
        }
        if (type == BINDER_TYPE_FD) {
            // FDs from the kernel are always owned
            FdTag(flat->handle, 0, this);
            FdTag(flat->handle, nullptr, this);
        }
        minOffset = offset + sizeof(flat_binder_object);
    }
+3 −3
Original line number Diff line number Diff line
@@ -230,8 +230,8 @@ std::optional<RecordedTransaction> RecordedTransaction::fromFile(const unique_fd
        }

        size_t memoryMappedSize = chunkPayloadSize + mmapPayloadStartOffset;
        void* mappedMemory =
                mmap(NULL, memoryMappedSize, PROT_READ, MAP_SHARED, fd.get(), mmapPageAlignedStart);
        void* mappedMemory = mmap(nullptr, memoryMappedSize, PROT_READ, MAP_SHARED, fd.get(),
                                  mmapPageAlignedStart);
        auto mmap_guard = make_scope_guard(
                [mappedMemory, memoryMappedSize] { munmap(mappedMemory, memoryMappedSize); });

@@ -382,7 +382,7 @@ android::status_t RecordedTransaction::dumpToFile(const unique_fd& fd) const {
        return UNKNOWN_ERROR;
    }

    if (NO_ERROR != writeChunk(fd, END_CHUNK, 0, NULL)) {
    if (NO_ERROR != writeChunk(fd, END_CHUNK, 0, nullptr)) {
        ALOGE("Failed to write end chunk to fd %d", fd.get());
        return UNKNOWN_ERROR;
    }
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ bool Stability::requiresVintfDeclaration(const sp<IBinder>& binder) {
}

void Stability::tryMarkCompilationUnit(IBinder* binder) {
    (void)setRepr(binder, getLocalLevel(), REPR_NONE);
    std::ignore = setRepr(binder, getLocalLevel(), REPR_NONE);
}

// after deprecation of the VNDK, these should be aliases. At some point
Loading