Merge "Use String8/16 c_str [security]" into main am: f646832675 am: 7eb27056c0 am: 4cffb7d5bc

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

Change-Id: I2b635b1649e3c7337d3d04466709741dcb1bc0f3
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 a2edd62..4c46719 100644
--- a/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
+++ b/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
@@ -98,17 +98,17 @@
                         TypedTag<TagType::BYTES, tag> tag_type, const char* prop) {
     ::android::String8 prop_name =
             ::android::String8::format("ro.product.%s_for_attestation", prop);
-    std::string prop_value = ::android::base::GetProperty(prop_name.string(), /* default= */ "");
+    std::string prop_value = ::android::base::GetProperty(prop_name.c_str(), /* default= */ "");
     if (!prop_value.empty()) {
-        add_tag_from_prop(attestation_id_tags, tag_type, prop_name.string());
+        add_tag_from_prop(attestation_id_tags, tag_type, prop_name.c_str());
     } else {
         prop_name = ::android::String8::format("ro.product.vendor.%s", prop);
-        prop_value = ::android::base::GetProperty(prop_name.string(), /* default= */ "");
+        prop_value = ::android::base::GetProperty(prop_name.c_str(), /* default= */ "");
         if (!prop_value.empty()) {
-            add_tag_from_prop(attestation_id_tags, tag_type, prop_name.string());
+            add_tag_from_prop(attestation_id_tags, tag_type, prop_name.c_str());
         } else {
             prop_name = ::android::String8::format("ro.product.%s", prop);
-            add_tag_from_prop(attestation_id_tags, tag_type, prop_name.string());
+            add_tag_from_prop(attestation_id_tags, tag_type, prop_name.c_str());
         }
     }
 }