summaryrefslogtreecommitdiffstats
path: root/otautil
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-05-04 06:53:11 +0200
committerTao Bao <tbao@google.com>2018-05-09 00:53:56 +0200
commit6cd816859e462e8741ced8dc24c00b7cd8304e2a (patch)
treeb4e2e9919eb1d0ed11c6dd330d42ffacd71b3db1 /otautil
parentMerge "screen_ui: Drop the parameter in CheckBackgroundTextImages." (diff)
downloadandroid_bootable_recovery-6cd816859e462e8741ced8dc24c00b7cd8304e2a.tar
android_bootable_recovery-6cd816859e462e8741ced8dc24c00b7cd8304e2a.tar.gz
android_bootable_recovery-6cd816859e462e8741ced8dc24c00b7cd8304e2a.tar.bz2
android_bootable_recovery-6cd816859e462e8741ced8dc24c00b7cd8304e2a.tar.lz
android_bootable_recovery-6cd816859e462e8741ced8dc24c00b7cd8304e2a.tar.xz
android_bootable_recovery-6cd816859e462e8741ced8dc24c00b7cd8304e2a.tar.zst
android_bootable_recovery-6cd816859e462e8741ced8dc24c00b7cd8304e2a.zip
Diffstat (limited to 'otautil')
-rw-r--r--otautil/include/otautil/paths.h10
-rw-r--r--otautil/paths.cpp2
2 files changed, 12 insertions, 0 deletions
diff --git a/otautil/include/otautil/paths.h b/otautil/include/otautil/paths.h
index 788c3de33..39088f100 100644
--- a/otautil/include/otautil/paths.h
+++ b/otautil/include/otautil/paths.h
@@ -48,6 +48,13 @@ class Paths {
last_command_file_ = last_command_file;
}
+ std::string resource_dir() const {
+ return resource_dir_;
+ }
+ void set_resource_dir(const std::string& resource_dir) {
+ resource_dir_ = resource_dir;
+ }
+
std::string stash_directory_base() const {
return stash_directory_base_;
}
@@ -85,6 +92,9 @@ class Paths {
// Path to the last command file.
std::string last_command_file_;
+ // Path to the resource dir;
+ std::string resource_dir_;
+
// Path to the base directory to write stashes during update.
std::string stash_directory_base_;
diff --git a/otautil/paths.cpp b/otautil/paths.cpp
index ad9ec1145..f08e51c7a 100644
--- a/otautil/paths.cpp
+++ b/otautil/paths.cpp
@@ -19,6 +19,7 @@
constexpr const char kDefaultCacheLogDirectory[] = "/cache/recovery";
constexpr const char kDefaultCacheTempSource[] = "/cache/saved.file";
constexpr const char kDefaultLastCommandFile[] = "/cache/recovery/last_command";
+constexpr const char kDefaultResourceDirectory[] = "/res/images";
constexpr const char kDefaultStashDirectoryBase[] = "/cache/recovery";
constexpr const char kDefaultTemporaryInstallFile[] = "/tmp/last_install";
constexpr const char kDefaultTemporaryLogFile[] = "/tmp/recovery.log";
@@ -32,6 +33,7 @@ Paths::Paths()
: cache_log_directory_(kDefaultCacheLogDirectory),
cache_temp_source_(kDefaultCacheTempSource),
last_command_file_(kDefaultLastCommandFile),
+ resource_dir_(kDefaultResourceDirectory),
stash_directory_base_(kDefaultStashDirectoryBase),
temporary_install_file_(kDefaultTemporaryInstallFile),
temporary_log_file_(kDefaultTemporaryLogFile) {}