summaryrefslogtreecommitdiffstats
path: root/otautil
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-03-08 21:34:19 +0100
committerTianjie Xu <xunchang@google.com>2018-03-08 23:40:09 +0100
commit01daebbe68943725e7b80e30082330c6bd042a88 (patch)
tree432867ded565478c49fd2734c67455cfb90dd130 /otautil
parentMerge "Add a singleton CacheLocation to replace the hard coded locations" am: 47cd789eed am: a72f93d6da (diff)
downloadandroid_bootable_recovery-01daebbe68943725e7b80e30082330c6bd042a88.tar
android_bootable_recovery-01daebbe68943725e7b80e30082330c6bd042a88.tar.gz
android_bootable_recovery-01daebbe68943725e7b80e30082330c6bd042a88.tar.bz2
android_bootable_recovery-01daebbe68943725e7b80e30082330c6bd042a88.tar.lz
android_bootable_recovery-01daebbe68943725e7b80e30082330c6bd042a88.tar.xz
android_bootable_recovery-01daebbe68943725e7b80e30082330c6bd042a88.tar.zst
android_bootable_recovery-01daebbe68943725e7b80e30082330c6bd042a88.zip
Diffstat (limited to 'otautil')
-rw-r--r--otautil/cache_location.cpp9
-rw-r--r--otautil/include/otautil/cache_location.h5
2 files changed, 5 insertions, 9 deletions
diff --git a/otautil/cache_location.cpp b/otautil/cache_location.cpp
index 8f289487f..8ddefec5e 100644
--- a/otautil/cache_location.cpp
+++ b/otautil/cache_location.cpp
@@ -25,8 +25,7 @@ CacheLocation& CacheLocation::location() {
return cache_location;
}
-void CacheLocation::ResetLocations() {
- cache_temp_source_ = kDefaultCacheTempSource;
- last_command_file_ = kDefaultLastCommandFile;
- stash_directory_base_ = kDefaultStashDirectoryBase;
-}
+CacheLocation::CacheLocation()
+ : cache_temp_source_(kDefaultCacheTempSource),
+ last_command_file_(kDefaultLastCommandFile),
+ stash_directory_base_(kDefaultStashDirectoryBase) {}
diff --git a/otautil/include/otautil/cache_location.h b/otautil/include/otautil/cache_location.h
index 85e0d485c..f2f663816 100644
--- a/otautil/include/otautil/cache_location.h
+++ b/otautil/include/otautil/cache_location.h
@@ -27,9 +27,6 @@ class CacheLocation {
public:
static CacheLocation& location();
- // Reset the locations to their default values.
- void ResetLocations();
-
// getter and setter functions.
std::string cache_temp_source() const {
return cache_temp_source_;
@@ -53,7 +50,7 @@ class CacheLocation {
}
private:
- CacheLocation() {}
+ CacheLocation();
DISALLOW_COPY_AND_ASSIGN(CacheLocation);
// When there isn't enough room on the target filesystem to hold the patched version of the file,