summaryrefslogtreecommitdiffstats
path: root/otautil/paths.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-04-26 03:59:40 +0200
committerTao Bao <tbao@google.com>2018-04-26 06:46:00 +0200
commit641fa97def3e6ef52471e47ad25d0658ef4d943e (patch)
treef26b3a858f289f5806b92daf0e776c082a246b8a /otautil/paths.cpp
parentMerge "updater_sample: Use stubs libs for android.test.base / runner." (diff)
downloadandroid_bootable_recovery-641fa97def3e6ef52471e47ad25d0658ef4d943e.tar
android_bootable_recovery-641fa97def3e6ef52471e47ad25d0658ef4d943e.tar.gz
android_bootable_recovery-641fa97def3e6ef52471e47ad25d0658ef4d943e.tar.bz2
android_bootable_recovery-641fa97def3e6ef52471e47ad25d0658ef4d943e.tar.lz
android_bootable_recovery-641fa97def3e6ef52471e47ad25d0658ef4d943e.tar.xz
android_bootable_recovery-641fa97def3e6ef52471e47ad25d0658ef4d943e.tar.zst
android_bootable_recovery-641fa97def3e6ef52471e47ad25d0658ef4d943e.zip
Diffstat (limited to '')
-rw-r--r--otautil/paths.cpp (renamed from otautil/cache_location.cpp)20
1 files changed, 12 insertions, 8 deletions
diff --git a/otautil/cache_location.cpp b/otautil/paths.cpp
index 6139bf17b..ad9ec1145 100644
--- a/otautil/cache_location.cpp
+++ b/otautil/paths.cpp
@@ -14,20 +14,24 @@
* limitations under the License.
*/
-#include "otautil/cache_location.h"
+#include "otautil/paths.h"
+constexpr const char kDefaultCacheLogDirectory[] = "/cache/recovery";
constexpr const char kDefaultCacheTempSource[] = "/cache/saved.file";
constexpr const char kDefaultLastCommandFile[] = "/cache/recovery/last_command";
constexpr const char kDefaultStashDirectoryBase[] = "/cache/recovery";
-constexpr const char kDefaultCacheLogDirectory[] = "/cache/recovery";
+constexpr const char kDefaultTemporaryInstallFile[] = "/tmp/last_install";
+constexpr const char kDefaultTemporaryLogFile[] = "/tmp/recovery.log";
-CacheLocation& CacheLocation::location() {
- static CacheLocation cache_location;
- return cache_location;
+Paths& Paths::Get() {
+ static Paths paths;
+ return paths;
}
-CacheLocation::CacheLocation()
- : cache_temp_source_(kDefaultCacheTempSource),
+Paths::Paths()
+ : cache_log_directory_(kDefaultCacheLogDirectory),
+ cache_temp_source_(kDefaultCacheTempSource),
last_command_file_(kDefaultLastCommandFile),
stash_directory_base_(kDefaultStashDirectoryBase),
- cache_log_directory_(kDefaultCacheLogDirectory) {}
+ temporary_install_file_(kDefaultTemporaryInstallFile),
+ temporary_log_file_(kDefaultTemporaryLogFile) {}