[res] Change OverlayableInfo to hold string views
No need to copy the strings as we keep them in separate
containers anyway, may just reference them
Bug: 237583012
Test: build + boot + UTs
Change-Id: I2853cd3c992ca482ed6988e0c52a4037b158d999
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index 1b32701..cc7e871 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -374,7 +374,7 @@
const std::string name = ToFormattedResourceString(*res_name);
output.append(base::StringPrintf(
"resource='%s' overlayable='%s' actor='%s' policy='0x%08x'\n",
- name.c_str(), info->name.c_str(), info->actor.c_str(), info->policy_flags));
+ name.c_str(), info->name.data(), info->actor.data(), info->policy_flags));
}
}
}