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
Change-Id: Ia6e00797f0839be8afe5ad705e7f75d2f413a67e
Merged-In: Ia6e00797f0839be8afe5ad705e7f75d2f413a67e
(cherry picked from commit 2903e2885a9cee4bf7f22af1a5ccd35283b79a69)
diff --git a/AccessControl.cpp b/AccessControl.cpp
index 985feb7..93d78e2 100644
--- a/AccessControl.cpp
+++ b/AccessControl.cpp
@@ -38,9 +38,9 @@
}
bool AccessControl::canAdd(const std::string& fqName, const Context &context, 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();
@@ -49,9 +49,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();