use FQName parse

FQName::FQName(string) could leave the FQName in an
invalid state, and so this constructor is being removed
and the mValid member is being removed.

Bug: 73774955
Test: boot
Merged-In: Ia6e00797f0839be8afe5ad705e7f75d2f413a67e
Change-Id: Ia6e00797f0839be8afe5ad705e7f75d2f413a67e
diff --git a/AccessControl.cpp b/AccessControl.cpp
index abcb569..97f14c6 100644
--- a/AccessControl.cpp
+++ b/AccessControl.cpp
@@ -37,9 +37,9 @@
 }
 
 bool AccessControl::canAdd(const std::string& fqName, pid_t pid) {
-    FQName fqIface(fqName);
+    FQName fqIface;
 
-    if (!fqIface.isValid()) {
+    if (!FQName::parse(fqName, &fqIface)) {
         return false;
     }
     const std::string checkName = fqIface.package() + "::" + fqIface.name();
@@ -48,9 +48,9 @@
 }
 
 bool AccessControl::canGet(const std::string& fqName, pid_t pid) {
-    FQName fqIface(fqName);
+    FQName fqIface;
 
-    if (!fqIface.isValid()) {
+    if (!FQName::parse(fqName, &fqIface)) {
         return false;
     }
     const std::string checkName = fqIface.package() + "::" + fqIface.name();
diff --git a/Vintf.cpp b/Vintf.cpp
index d2d2f00..989adc0 100644
--- a/Vintf.cpp
+++ b/Vintf.cpp
@@ -23,8 +23,9 @@
 }
 
 vintf::Transport getTransport(const std::string &interfaceName, const std::string &instanceName) {
-    FQName fqName(interfaceName);
-    if (!fqName.isValid()) {
+    FQName fqName;
+
+    if (!FQName::parse(interfaceName, &fqName)) {
         LOG(ERROR) << __FUNCTION__ << ": " << interfaceName
                    << " is not a valid fully-qualified name ";
         return vintf::Transport::EMPTY;