diff options
Diffstat (limited to 'runtime/base/file_utils.cc')
| -rw-r--r-- | runtime/base/file_utils.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/base/file_utils.cc b/runtime/base/file_utils.cc index 1cb3b9c380..36caa7fcfb 100644 --- a/runtime/base/file_utils.cc +++ b/runtime/base/file_utils.cc @@ -319,4 +319,11 @@ bool LocationIsOnSystem(const char* location) { return path != nullptr && android::base::StartsWith(path.get(), GetAndroidRoot().c_str()); } +bool LocationIsOnSystemFramework(const char* location) { + UniqueCPtr<const char[]> path(realpath(location, nullptr)); + std::string framework_path = GetAndroidRoot() + "/framework/"; + return path != nullptr && + android::base::StartsWith(path.get(), framework_path.c_str()); +} + } // namespace art |