summaryrefslogtreecommitdiffstats
path: root/otautil/cache_location.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Set the update locations to default in CacheLocation's constructorTianjie Xu2018-03-081-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
* Add a singleton CacheLocation to replace the hard coded locationsTianjie Xu2018-02-281-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