summaryrefslogtreecommitdiff
path: root/tools/aapt2/cmd/Util.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/cmd/Util.h')
-rw-r--r--tools/aapt2/cmd/Util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/aapt2/cmd/Util.h b/tools/aapt2/cmd/Util.h
index 7611c1526104..fb8753ed2286 100644
--- a/tools/aapt2/cmd/Util.h
+++ b/tools/aapt2/cmd/Util.h
@@ -60,6 +60,13 @@ std::unique_ptr<xml::XmlResource> GenerateSplitManifest(const AppInfo& app_info,
Maybe<AppInfo> ExtractAppInfoFromBinaryManifest(const xml::XmlResource& xml_res,
IDiagnostics* diag);
+// Returns a copy of 'name' which conforms to the regex '[a-zA-Z]+[a-zA-Z0-9_]*' by
+// replacing nonconforming characters with underscores.
+//
+// See frameworks/base/core/java/android/content/pm/PackageParser.java which
+// checks this at runtime.
+std::string MakePackageSafeName(const std::string &name);
+
} // namespace aapt
#endif /* AAPT_SPLIT_UTIL_H */