summaryrefslogtreecommitdiff
path: root/scripts/update_device.py
diff options
context:
space:
mode:
authorAaron Wood <aaronwood@google.com>2017-09-07 11:18:54 -0700
committerSen Jiang <senj@google.com>2017-09-19 18:04:35 -0700
commit9321f501029e7c0fdca55db3a79c9dcb24e4a767 (patch)
tree50eac2d84c7fc5b82e13941a9dff1657c9ea4670 /scripts/update_device.py
parent7dcdedf1b65bc3cc15ea7486d612eae5713e07d8 (diff)
Track bytes received across multiple update files
When downloading the packages that comprise a multi-package or multi-app update, the UpdateAttempter receives BytesReceived() callbacks with bytes_received resetting to 0 for each file. This causes the progress calculations to be incorrect. This change tracks the total of the previously downloaded packages within the DownloadAction, so that it properly tracks. Resumed downloads will jump ahead over skipped data, when the payload is incremented. Bug: 65451460 Tests: Added unit tests to directly test the accumulation and the the transition from the previous state to UpdateStatus::DOWNLOADING when the first bytes are received. Change-Id: I3b540df16b9a664b09f53ee3ec962e2cbc8adf1b (cherry picked from commit d6f869dbd9952be8a926e80c4f1e172845ab8d5f)
Diffstat (limited to 'scripts/update_device.py')
0 files changed, 0 insertions, 0 deletions