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

Commit 608f3145 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove log if cache is disabled." into main am: 67b445a4

parents cadcf50f 67b445a4
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -130,7 +130,13 @@ os::ServiceWithMetadata createServiceWithMetadata(const sp<IBinder>& service, bo


bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string& serviceName) {
bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string& serviceName) {
    sp<ProcessState> self = ProcessState::selfOrNull();
    sp<ProcessState> self = ProcessState::selfOrNull();
    if (!self || self->getThreadPoolMaxTotalThreadCount() <= 0) {
    // Should not cache if process state could not be found, or if thread pool
    // max could is not greater than zero.
    if (!self) {
        ALOGW("Service retrieved before binder threads started. If they are to be started, "
              "consider starting binder threads earlier.");
        return false;
    } else if (self->getThreadPoolMaxTotalThreadCount() <= 0) {
        ALOGW("Thread Pool max thread count is 0. Cannot cache binder as linkToDeath cannot be "
        ALOGW("Thread Pool max thread count is 0. Cannot cache binder as linkToDeath cannot be "
              "implemented. serviceName: %s",
              "implemented. serviceName: %s",
              serviceName.c_str());
              serviceName.c_str());