Home
last modified time | relevance | path

Searched refs:roleName (Results 1 – 2 of 2) sorted by relevance

/hardware/interfaces/usb/1.0/default/
DUsb.cpp121 std::string roleName; in getCurrentRoleHelper() local
137 if (readFile(filename, roleName)) { in getCurrentRoleHelper()
142 if (roleName == "dfp") in getCurrentRoleHelper()
144 else if (roleName == "ufp") in getCurrentRoleHelper()
146 else if (roleName == "source") in getCurrentRoleHelper()
148 else if (roleName == "sink") in getCurrentRoleHelper()
150 else if (roleName == "host") in getCurrentRoleHelper()
152 else if (roleName == "device") in getCurrentRoleHelper()
154 else if (roleName != "none") { in getCurrentRoleHelper()
/hardware/interfaces/usb/aidl/default/
DUsb.cpp170 void extractRole(string *roleName) { in extractRole() argument
173 first = roleName->find("["); in extractRole()
174 last = roleName->find("]"); in extractRole()
177 *roleName = roleName->substr(first + 1, last - first - 1); in extractRole()
365 string roleName; in getCurrentRoleHelper() local
399 if (!ReadFileToString(filename, &roleName)) { in getCurrentRoleHelper()
404 roleName = Trim(roleName); in getCurrentRoleHelper()
405 extractRole(&roleName); in getCurrentRoleHelper()
407 if (roleName == "source") { in getCurrentRoleHelper()
409 } else if (roleName == "sink") { in getCurrentRoleHelper()
[all …]