summaryrefslogtreecommitdiff
path: root/libs/jpegrecoverymap/jpegencoderhelper.cpp
diff options
context:
space:
mode:
author Keun young Park <keunyoung@google.com> 2021-10-25 08:09:27 -0700
committer Keun young Park <keunyoung@google.com> 2021-12-13 17:47:58 -0800
commitb734226ffdb9164aed4367a364a3835bea2aa1c7 (patch)
tree68b987707fa233fe2830959573787561a4614a36 /libs/jpegrecoverymap/jpegencoderhelper.cpp
parent34b427adf6897e59b43716adf3528988b0b02199 (diff)
dexopt: Restore old files when cancelled
- out_oat, out_vdex, out_image will be first updated upon temporary work file. When dex2oat is completed, this temp file is committed and renamed into regular file. - For whatever reason, if renaming fails, guarantee three states: all files committed to new version all files kept with original version all three files removed - reference_profile is kept for cancellation or successful run while removed for dexopt failure. - Added RestorableFile to handle usage for out_* files. - Added unit test. - Also fixed wrong returning of completed state for cancellation. Bug: 203689833 Bug: 32230521 Test: atest installd_unique_file_test installd_dexopt_test Change-Id: Ib6804fb311596dfd9180c1d6083cd2e9a661b621
Diffstat (limited to 'libs/jpegrecoverymap/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions