Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb7951d2 authored by Steven Moreland's avatar Steven Moreland
Browse files

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
parent 73523fdc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;