Merge "Re-order skip checks for attestation tests" am: 475bb11af0 am: 7bd7dac78e am: 51fb093087

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2479695

Change-Id: Iaee8613b8135daab9bfd068b42593ab822d6b74b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
index bbf3633..8ffc179 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -172,8 +172,9 @@
     //     allowing it to be launched with Android S (or later) with Keymaster 4.0
     //     in StrongBox
     void check_skip_test(void) const {
-        if (is_attest_key_feature_disabled() && is_strongbox_enabled() &&
-            is_chipset_allowed_km4_strongbox()) {
+        // Check the chipset first as that doesn't require a round-trip to Package Manager.
+        if (is_chipset_allowed_km4_strongbox() && is_strongbox_enabled() &&
+            is_attest_key_feature_disabled()) {
             GTEST_SKIP() << "Test is not applicable";
         }
     }