summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-03-12 10:38:03 +0100
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-03-12 10:38:03 +0100
commita628240d295f5dd7867bde7f3d7ab72c294097b1 (patch)
tree4cf12299ce2eb9372e7929e48552a7483110135e
parentSnap for 4641592 from 9c332915ba9fe8f1f99e5019bcb2db25f21b8024 to qt-release (diff)
parentMerge "Set the update locations to default in CacheLocation's constructor" am: 0acbdac82b am: 7120c687a5 (diff)
downloadandroid_bootable_recovery-a628240d295f5dd7867bde7f3d7ab72c294097b1.tar
android_bootable_recovery-a628240d295f5dd7867bde7f3d7ab72c294097b1.tar.gz
android_bootable_recovery-a628240d295f5dd7867bde7f3d7ab72c294097b1.tar.bz2
android_bootable_recovery-a628240d295f5dd7867bde7f3d7ab72c294097b1.tar.lz
android_bootable_recovery-a628240d295f5dd7867bde7f3d7ab72c294097b1.tar.xz
android_bootable_recovery-a628240d295f5dd7867bde7f3d7ab72c294097b1.tar.zst
android_bootable_recovery-a628240d295f5dd7867bde7f3d7ab72c294097b1.zip
-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 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,
diff --git a/updater/updater.cpp b/updater/updater.cpp
index f063e5fa1..1d6b172bb 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -169,10 +169,6 @@ int main(int argc, char** argv) {
}
ota_io_init(za, state.is_retry);
- // Initialize the cache_temp_source, last_command_file and stash_directory_base to their default
- // locations.
- CacheLocation::location().ResetLocations();
-
std::string result;
bool status = Evaluate(&state, root, &result);