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

Commit f45fd103 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "Failing to enable oneway spam detection is not an error." am:...

Merge "Failing to enable oneway spam detection is not an error." am: ccd2b60c am: 5c84d600 am: c708616d

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1683871

Change-Id: I68b40e32ab7a0e88710b4200bb9b800fff1ca0a7
parents fa030dc2 c708616d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -362,7 +362,7 @@ status_t ProcessState::setThreadPoolMaxThreadCount(size_t maxThreads) {
status_t ProcessState::enableOnewaySpamDetection(bool enable) {
status_t ProcessState::enableOnewaySpamDetection(bool enable) {
    uint32_t enableDetection = enable ? 1 : 0;
    uint32_t enableDetection = enable ? 1 : 0;
    if (ioctl(mDriverFD, BINDER_ENABLE_ONEWAY_SPAM_DETECTION, &enableDetection) == -1) {
    if (ioctl(mDriverFD, BINDER_ENABLE_ONEWAY_SPAM_DETECTION, &enableDetection) == -1) {
        ALOGE("Binder ioctl to enable oneway spam detection failed: %s", strerror(errno));
        ALOGI("Binder ioctl to enable oneway spam detection failed: %s", strerror(errno));
        return -errno;
        return -errno;
    }
    }
    return NO_ERROR;
    return NO_ERROR;
@@ -401,7 +401,7 @@ static int open_driver(const char *driver)
        uint32_t enable = DEFAULT_ENABLE_ONEWAY_SPAM_DETECTION;
        uint32_t enable = DEFAULT_ENABLE_ONEWAY_SPAM_DETECTION;
        result = ioctl(fd, BINDER_ENABLE_ONEWAY_SPAM_DETECTION, &enable);
        result = ioctl(fd, BINDER_ENABLE_ONEWAY_SPAM_DETECTION, &enable);
        if (result == -1) {
        if (result == -1) {
            ALOGE("Binder ioctl to enable oneway spam detection failed: %s", strerror(errno));
            ALOGI("Binder ioctl to enable oneway spam detection failed: %s", strerror(errno));
        }
        }
    } else {
    } else {
        ALOGW("Opening '%s' failed: %s\n", driver, strerror(errno));
        ALOGW("Opening '%s' failed: %s\n", driver, strerror(errno));