summaryrefslogtreecommitdiffstats
path: root/otautil/cache_location.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-03-08Set the update locations to default in CacheLocation's constructorTianjie Xu1-5/+4
Otherwise the applypatch executable will fail to back up the source file to /cache when patching the recovery image. Bug: 74198354 Test: run applypatch from boot to recovery (cherry picked from commit b4e3a370bf6fe2bbb6ad8e33d16ce3210595aaef) Change-Id: I37b7fd88d66ab49ef953d4b7dca22577bd1472e1
2018-02-28Add a singleton CacheLocation to replace the hard coded locationsTianjie Xu1-0/+32
This class allows us to set the following locations dynamically: cache_temp_source, last_command_file, stash_directory_base. In the updater's main function, we reset the values of these variables to their default locations in /cache; while we can set them to temp files in unit tests or host simulation. Test: unit tests pass Change-Id: I528652650caa41373617ab055d41b1f1a4ec0f87