aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--otautil/cache_location.cpp9
-rw-r--r--otautil/include/otautil/cache_location.h5
-rw-r--r--updater/updater.cpp4
3 files changed, 5 insertions, 13 deletions
diff --git a/otautil/cache_location.cpp b/otautil/cache_location.cpp
index 8f289487..8ddefec5 100644
--- a/otautil/cache_location.cpp
+++ b/otautil/cache_location.cpp
@@ -25,8 +25,7 @@ CacheLocation& CacheLocation::location() {
25 return cache_location; 25 return cache_location;
26} 26}
27 27
28void CacheLocation::ResetLocations() { 28CacheLocation::CacheLocation()
29 cache_temp_source_ = kDefaultCacheTempSource; 29 : cache_temp_source_(kDefaultCacheTempSource),
30 last_command_file_ = kDefaultLastCommandFile; 30 last_command_file_(kDefaultLastCommandFile),
31 stash_directory_base_ = kDefaultStashDirectoryBase; 31 stash_directory_base_(kDefaultStashDirectoryBase) {}
32}
diff --git a/otautil/include/otautil/cache_location.h b/otautil/include/otautil/cache_location.h
index 85e0d485..f2f66381 100644
--- a/otautil/include/otautil/cache_location.h
+++ b/otautil/include/otautil/cache_location.h
@@ -27,9 +27,6 @@ class CacheLocation {
27 public: 27 public:
28 static CacheLocation& location(); 28 static CacheLocation& location();
29 29
30 // Reset the locations to their default values.
31 void ResetLocations();
32
33 // getter and setter functions. 30 // getter and setter functions.
34 std::string cache_temp_source() const { 31 std::string cache_temp_source() const {
35 return cache_temp_source_; 32 return cache_temp_source_;
@@ -53,7 +50,7 @@ class CacheLocation {
53 } 50 }
54 51
55 private: 52 private:
56 CacheLocation() {} 53 CacheLocation();
57 DISALLOW_COPY_AND_ASSIGN(CacheLocation); 54 DISALLOW_COPY_AND_ASSIGN(CacheLocation);
58 55
59 // When there isn't enough room on the target filesystem to hold the patched version of the file, 56 // When there isn't enough room on the target filesystem to hold the patched version of the file,
diff --git a/updater/updater.cpp b/updater/updater.cpp
index f063e5fa..1d6b172b 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -169,10 +169,6 @@ int main(int argc, char** argv) {
169 } 169 }
170 ota_io_init(za, state.is_retry); 170 ota_io_init(za, state.is_retry);
171 171
172 // Initialize the cache_temp_source, last_command_file and stash_directory_base to their default
173 // locations.
174 CacheLocation::location().ResetLocations();
175
176 std::string result; 172 std::string result;
177 bool status = Evaluate(&state, root, &result); 173 bool status = Evaluate(&state, root, &result);
178 174