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

Commit 76d87305 authored by Yifan Hong's avatar Yifan Hong Committed by Gerrit Code Review
Browse files

Merge changes from topic "fcm_exclude_aidl_version" into main

* changes:
  fcm_exclude: mark bluetooth.audio@1 as deprecated.
  matrices: Add gnss.* to fcm_exclude.
  fcm_exclude: Aidl HALs contains versions.
parents 802c53da 19d015a4
Loading
Loading
Loading
Loading
+28 −20
Original line number Original line Diff line number Diff line
@@ -104,7 +104,7 @@ bool ShouldCheckMissingHidlHalsInFcm(const std::string& packageAndVersion) {
}
}


// The predicate to VintfObject::checkMissingHalsInMatrices.
// The predicate to VintfObject::checkMissingHalsInMatrices.
bool ShouldCheckMissingAidlHalsInFcm(const std::string& package) {
bool ShouldCheckMissingAidlHalsInFcm(const std::string& packageAndVersion) {
    static std::vector<std::string> included_prefixes{
    static std::vector<std::string> included_prefixes{
            // Other AOSP HALs (e.g. android.frameworks.*) are not added because only framework
            // Other AOSP HALs (e.g. android.frameworks.*) are not added because only framework
            // matrix is checked.
            // matrix is checked.
@@ -112,36 +112,43 @@ bool ShouldCheckMissingAidlHalsInFcm(const std::string& package) {
    };
    };


    static std::vector<std::string> excluded_prefixes{
    static std::vector<std::string> excluded_prefixes{
            // Packages without top level interfaces (including types-only packages) are exempted.
            "android.hardware.audio.common@",
            "android.hardware.biometrics.common@",
            "android.hardware.camera.metadata@",
            "android.hardware.camera.device@",
            "android.hardware.camera.common@",
            "android.hardware.common@",
            "android.hardware.common.fmq@",
            "android.hardware.gnss.measurement_corrections@",
            "android.hardware.gnss.visibility_control@",
            "android.hardware.graphics.common@",
            "android.hardware.input.common@",
            "android.hardware.keymaster@",
            "android.hardware.media.bufferpool2@",
            "android.hardware.radio@",
            "android.hardware.uwb.fira_android@",

            // Test packages are exempted.
            // Test packages are exempted.
            "android.hardware.tests.",
            "android.hardware.tests.",

            // Fastboot HAL is only used by recovery. Recovery is owned by OEM. Framework
            // does not depend on this HAL, hence it is not declared in any manifests or matrices.
            "android.hardware.fastboot@",
    };
    };


    static std::vector<std::string> excluded_exact{
    static std::vector<std::string> excluded_exact{
            // Packages without top level interfaces (including types-only packages) are exempted.
            // Packages without top level interfaces (including types-only packages) are exempted.


            // AIDL
            // AIDL
            "android.hardware.audio.common",
            "android.hardware.audio.core.sounddose@1",
            "android.hardware.audio.core.sounddose",
            "android.hardware.biometrics.common",
            "android.hardware.camera.metadata",
            "android.hardware.camera.device",
            "android.hardware.camera.common",
            "android.hardware.common",
            "android.hardware.common.fmq",
            "android.hardware.graphics.common",
            "android.hardware.input.common",
            "android.hardware.keymaster",
            "android.hardware.media.bufferpool2",
            "android.hardware.radio",
            "android.hardware.uwb.fira_android",


            // Fastboot HAL is only used by recovery. Recovery is owned by OEM. Framework
            // Deprecated HALs.
            // does not depend on this HAL, hence it is not declared in any manifests or matrices.
            "android.hardware.bluetooth.audio@1",
            "android.hardware.fastboot",
    };
    };


    auto package_has_prefix = [&](const std::string& prefix) {
    auto package_has_prefix = [&](const std::string& prefix) {
        return android::base::StartsWith(package, prefix);
        return android::base::StartsWith(packageAndVersion, prefix);
    };
    };


    // Only check packageAndVersions that are in the include list and not in the exclude list.
    // Only check packageAndVersions that are in the include list and not in the exclude list.
@@ -149,7 +156,8 @@ bool ShouldCheckMissingAidlHalsInFcm(const std::string& package) {
        return false;
        return false;
    }
    }


    if (std::find(excluded_exact.begin(), excluded_exact.end(), package) != excluded_exact.end()) {
    if (std::find(excluded_exact.begin(), excluded_exact.end(), packageAndVersion) !=
        excluded_exact.end()) {
        return false;
        return false;
    }
    }


+2 −2
Original line number Original line Diff line number Diff line
@@ -24,8 +24,8 @@ namespace android::vintf::details {
// Determine whether VINTF checks |package| is missing from FCMs.
// Determine whether VINTF checks |package| is missing from FCMs.
// |package| can be a HIDL package and version like
// |package| can be a HIDL package and version like
// "android.hardware.foo@1.0", or an AIDL package name like
// "android.hardware.foo@1.0", or an AIDL package name like
// "android.hardware.foo".
// "android.hardware.foo@1".
bool ShouldCheckMissingHidlHalsInFcm(const std::string& packageAndVersion);
bool ShouldCheckMissingHidlHalsInFcm(const std::string& packageAndVersion);
bool ShouldCheckMissingAidlHalsInFcm(const std::string& package);
bool ShouldCheckMissingAidlHalsInFcm(const std::string& packageAndVersion);


}  // namespace android::vintf::details
}  // namespace android::vintf::details