diff options
author | Jon Spivack <spivack@google.com> | 2019-07-26 13:14:42 -0700 |
---|---|---|
committer | Jon Spivack <spivack@google.com> | 2019-09-09 15:24:42 -0700 |
commit | 16fb3f9e425bc511ec5f8952d3130c633dee8ddc (patch) | |
tree | c1684bdc95e9ffb95580ca645f643d9a256c1b93 /init/service_parser.cpp | |
parent | 983f76b3c632b29ca6ff858d986378a9028493c2 (diff) |
Allow AIDL interfaces in service parsing
Bug: 138756857
Test: Manual (using mediaextractor as a test service)
Change-Id: Ice2c695fca7062d6a115df13a6ac1d6fe82a3a98
Diffstat (limited to 'init/service_parser.cpp')
-rw-r--r-- | init/service_parser.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/init/service_parser.cpp b/init/service_parser.cpp index dd552fb9f..543be2329 100644 --- a/init/service_parser.cpp +++ b/init/service_parser.cpp @@ -145,17 +145,21 @@ Result<void> ServiceParser::ParseInterface(std::vector<std::string>&& args) { const std::string& interface_name = args[1]; const std::string& instance_name = args[2]; - FQName fq_name; - if (!FQName::parse(interface_name, &fq_name)) { - return Error() << "Invalid fully-qualified name for interface '" << interface_name << "'"; - } + // AIDL services don't use fully qualified names and instead just use "interface aidl <name>" + if (interface_name != "aidl") { + FQName fq_name; + if (!FQName::parse(interface_name, &fq_name)) { + return Error() << "Invalid fully-qualified name for interface '" << interface_name + << "'"; + } - if (!fq_name.isFullyQualified()) { - return Error() << "Interface name not fully-qualified '" << interface_name << "'"; - } + if (!fq_name.isFullyQualified()) { + return Error() << "Interface name not fully-qualified '" << interface_name << "'"; + } - if (fq_name.isValidValueName()) { - return Error() << "Interface name must not be a value name '" << interface_name << "'"; + if (fq_name.isValidValueName()) { + return Error() << "Interface name must not be a value name '" << interface_name << "'"; + } } const std::string fullname = interface_name + "/" + instance_name; |