diff --git a/libwvdrmengine/src/Utils.cpp b/libwvdrmengine/src/Utils.cpp index f517518e..0fb06a8a 100644 --- a/libwvdrmengine/src/Utils.cpp +++ b/libwvdrmengine/src/Utils.cpp @@ -11,6 +11,7 @@ #include "log.h" #include +#include namespace { // Please keep the order stable. @@ -200,6 +201,20 @@ bool matchesSocModelPattern(const std::string& socModel) { } bool checkIfEnableMultiThreadBinder() { + // On first boot, the /data/vendor/mediadrm path may not have been created + // by init yet. Calling QueryStatus at this stage would fail because the L3 + // service cannot initialize its filesystem, leading to a persistent error + // state. This check defers enabling multi-threading until the basic DRM + // filesystem is ready. b/425974655. + const char* kMediaDrmPath = "/data/vendor/mediadrm"; + struct stat sb; + + // check if the MediaDRM path exists and is a directory + if (stat(kMediaDrmPath, &sb) != 0 || !S_ISDIR(sb.st_mode)) { + LOGW("MediaDRM path does not exist, deferring multi-thread binder check."); + return false; + } + android::sp cdm = wvdrm::getCDM(); if (cdm == nullptr) { LOGW("Failed to get CDM when checking if multi-thread binder is enabled."); diff --git a/libwvdrmengine/version.txt b/libwvdrmengine/version.txt index 1dd4be18..c97a258d 100644 --- a/libwvdrmengine/version.txt +++ b/libwvdrmengine/version.txt @@ -1 +1 @@ -AV1A.250618.002 +AV1A.250627.001