Snap for 6027181 from 4e46e7d3fe99de2ece1f12b814f9771fba5d137c to android10-tests-release

Change-Id: I6b9d869f9625d9a393b1fef344255c693e49e512
diff --git a/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp b/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp
index 13a07f8..12096b4 100644
--- a/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp
+++ b/wifi/keystore/1.0/vts/functional/VtsHalWifiKeystoreV1_0TargetTest.cpp
@@ -254,21 +254,24 @@
         GTEST_SKIP() << "Device not running a debuggable build, cannot make test keys";
     }
 
-    IKeystore::KeystoreStatusCode statusCode;
+    bool callbackInvoked = false;
 
-    auto callback = [&statusCode](IKeystore::KeystoreStatusCode status,
-                                  const ::android::hardware::hidl_vec<uint8_t>& /*value*/) {
-        statusCode = status;
+    auto callback = [&callbackInvoked](IKeystore::KeystoreStatusCode /*status*/,
+                                       const ::android::hardware::hidl_vec<uint8_t>& /*value*/) {
+        // The result is ignored; this callback is a no-op.
+        callbackInvoked = true;
         return;
     };
 
     bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, AID_WIFI);
     EXPECT_EQ(result, true);
 
-    // The data to sign is empty, and a failure is expected
+    // The data to sign is empty. The return code is not important, and the attempt could be
+    // interpreted as valid or an error case. The goal is to determine that the callback
+    // was invokved.
     ::android::hardware::hidl_vec<uint8_t> dataToSign;
     keystore->sign(kTestKeyName, dataToSign, callback);
-    EXPECT_EQ(IKeystore::KeystoreStatusCode::ERROR_UNKNOWN, statusCode);
+    EXPECT_EQ(true, callbackInvoked);
 }
 
 TEST_F(WifiKeystoreHalTest, Sign_wrong_key_purpose) {