summaryrefslogtreecommitdiff
path: root/runtime/app_info.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/app_info.cc')
-rw-r--r--runtime/app_info.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/app_info.cc b/runtime/app_info.cc
index c72951eebc..2dbbbf6a90 100644
--- a/runtime/app_info.cc
+++ b/runtime/app_info.cc
@@ -93,6 +93,12 @@ void AppInfo::RegisterOdexStatus(const std::string& code_path,
<< "\nodex_status=" << odex_status;
}
+bool AppInfo::HasRegisteredAppInfo() {
+ MutexLock mu(Thread::Current(), update_mutex_);
+
+ return package_name_.has_value();
+}
+
void AppInfo::GetPrimaryApkOptimizationStatus(
std::string* out_compiler_filter,
std::string* out_compilation_reason) {
@@ -110,6 +116,13 @@ void AppInfo::GetPrimaryApkOptimizationStatus(
*out_compilation_reason = kUnknownValue;
}
+AppInfo::CodeType AppInfo::GetRegisteredCodeType(const std::string& code_path) {
+ MutexLock mu(Thread::Current(), update_mutex_);
+
+ const auto it = registered_code_locations_.find(code_path);
+ return it != registered_code_locations_.end() ? it->second.code_type : CodeType::kUnknown;
+}
+
std::ostream& operator<<(std::ostream& os, AppInfo& rhs) {
MutexLock mu(Thread::Current(), rhs.update_mutex_);