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

Commit cdee9b80 authored by Devin Moore's avatar Devin Moore Committed by Automerger Merge Worker
Browse files

Merge "Check Media c2 AIDL flag only for older devices" into main am: 3e492b87 am: a67b5edf

parents b4654353 a67b5edf
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -28,7 +28,12 @@
namespace android {
namespace android {


bool IsCodec2AidlHalSelected() {
bool IsCodec2AidlHalSelected() {
    if (!com::android::media::codec::flags::provider_->aidl_hal()) {
    // For new devices with vendor software targeting 202404, we always want to
    // use AIDL if it exists
    constexpr int kAndroidApi202404 = 202404;
    int vendorVersion = ::android::base::GetIntProperty("ro.vendor.api_level", -1);
    if (!com::android::media::codec::flags::provider_->aidl_hal() &&
        vendorVersion < kAndroidApi202404) {
        // Cannot select AIDL if not enabled
        // Cannot select AIDL if not enabled
        return false;
        return false;
    }
    }