From bb7951d252146e899fafda31f76a5025c73bd3f5 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 20 Aug 2019 16:58:25 -0700 Subject: servicemanager: Allow '/' character in service names. To work as instance name separater consistently w/ HIDL. In HIDL, people are used to writing something like: android.hardware.light@2.0::ILight/default In AIDL, the same thing would look like: android.hardware.light.ILight/default Bug: 136027762 Test: use '/' in service name Change-Id: Ie108029bd37b09647b761c5c5ce3a901dbfd4f19 --- cmds/servicemanager/ServiceManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/servicemanager/ServiceManager.cpp b/cmds/servicemanager/ServiceManager.cpp index f35f360dec..4d5c76ab95 100644 --- a/cmds/servicemanager/ServiceManager.cpp +++ b/cmds/servicemanager/ServiceManager.cpp @@ -67,7 +67,7 @@ bool isValidServiceName(const std::string& name) { if (name.size() > 127) return false; for (char c : name) { - if (c == '_' || c == '-' || c == '.') continue; + if (c == '_' || c == '-' || c == '.' || c == '/') continue; if (c >= 'a' && c <= 'z') continue; if (c >= 'A' && c <= 'Z') continue; if (c >= '0' && c <= '9') continue; -- cgit v1.2.3-59-g8ed1b