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

Commit 3d755937 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-05263112-375a-4b1f-a657-a14bb2a5c5a3-for-git_oc-mr1-release-41...

release-request-05263112-375a-4b1f-a657-a14bb2a5c5a3-for-git_oc-mr1-release-4185249 snap-temp-L63000000082739046

Change-Id: Ie7b6436c74445cc4c89210ccc8975c0ab9410f58
parents d08f53d8 3da6f353
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -98,8 +98,9 @@ static const char* hal_interfaces_to_dump[] {
        "android.hardware.bluetooth@1.0::IBluetoothHci",
        "android.hardware.camera.provider@2.4::ICameraProvider",
        "android.hardware.graphics.composer@2.1::IComposer",
        "android.hardware.vr@1.0::IVr",
        "android.hardware.media.omx@1.0::IOmx",
        "android.hardware.sensors@1.0::ISensors",
        "android.hardware.vr@1.0::IVr",
        NULL,
};

+1 −1
Original line number Diff line number Diff line
@@ -16,5 +16,5 @@

<!-- This is the standard set of features for a broadcast radio. -->
<permissions>
    <feature name="android.hardware.radio" />
    <feature name="android.hardware.broadcastradio" />
</permissions>

include/batteryservice

0 → 120000
+1 −0
Original line number Diff line number Diff line
../services/batteryservice/include/batteryservice/
 No newline at end of file
+10 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */

#include <binder/Debug.h>
#include <binder/ProcessState.h>

#include <utils/misc.h>

@@ -294,5 +295,14 @@ void printHexData(int32_t indent, const void *buf, size_t length,
    }
}

ssize_t getBinderKernelReferences(size_t count, uintptr_t* buf) {
    sp<ProcessState> proc = ProcessState::selfOrNull();
    if (proc.get() == NULL) {
        return 0;
    }

    return proc->getKernelReferences(count, buf);
}

}; // namespace android
+46 −0
Original line number Diff line number Diff line
@@ -90,6 +90,12 @@ sp<ProcessState> ProcessState::initWithDriver(const char* driver)
    return gProcess;
}

sp<ProcessState> ProcessState::selfOrNull()
{
    Mutex::Autolock _l(gProcessMutex);
    return gProcess;
}

void ProcessState::setContextObject(const sp<IBinder>& object)
{
    setContextObject(object, String16("default"));
@@ -176,6 +182,46 @@ bool ProcessState::becomeContextManager(context_check_func checkFunc, void* user
    return mManagesContexts;
}

// Get references to userspace objects held by the kernel binder driver
// Writes up to count elements into buf, and returns the total number
// of references the kernel has, which may be larger than count.
// buf may be NULL if count is 0.  The pointers returned by this method
// should only be used for debugging and not dereferenced, they may
// already be invalid.
ssize_t ProcessState::getKernelReferences(size_t buf_count, uintptr_t* buf)
{
    // TODO: remove these when they are defined by bionic's binder.h
    struct binder_node_debug_info {
        binder_uintptr_t ptr;
        binder_uintptr_t cookie;
        __u32 has_strong_ref;
        __u32 has_weak_ref;
    };
#define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info)

    binder_node_debug_info info = {};

    uintptr_t* end = buf ? buf + buf_count : NULL;
    size_t count = 0;

    do {
        status_t result = ioctl(mDriverFD, BINDER_GET_NODE_DEBUG_INFO, &info);
        if (result < 0) {
            return -1;
        }
        if (info.ptr != 0) {
            if (buf && buf < end)
                *buf++ = info.ptr;
            count++;
            if (buf && buf < end)
                *buf++ = info.cookie;
            count++;
        }
    } while (info.ptr != 0);

    return count;
}

ProcessState::handle_entry* ProcessState::lookupHandleLocked(int32_t handle)
{
    const size_t N=mHandleToObject.size();
Loading