summaryrefslogtreecommitdiff
path: root/src/org/lineageos/updater/download/HttpURLConnectionClient.java
AgeCommit message (Collapse)Author
2022-03-07Updater: Don't show thousands of daysMichael W
* When pausing and resuming, the ETA calculation is off by a lot due to the time diff since the last calculation resulting in a big delta and therefore a very low speed * By fixing this, we also need to set the last byte count to the total byte count there, otherwise the downloaded bytes since last calculation will be larger than in reality, resulting in too fast speeds calculated Change-Id: Ica1053cc297ff59221ea2bc0014f20973a080c88
2022-02-10Updater: The great cleanupMichael W
* Make final where possible * Remove unused casts, imports, methods, enums and constructors * Add null checks Change-Id: Idd1a16426dd1928e2ed9922f5a35ba32ce4f808b
2018-04-08Simplify code syntax using Java 8 featuresGabriele M
Change-Id: I3e59f0c38e4047595374a951619c9b43a46901df
2018-01-23Add support for duplicate linksGabriele M
Support duplicate links [1] to handle better temporarily unavailable mirrors. [1] https://tools.ietf.org/html/rfc6249 Change-Id: If78fb4a90da68ef221294eed2c59063a14cf1f43
2017-11-12Implement DownloadClient using HttpURLConnectionGabriele M
The version of OkHttp used in AOSP doesn't handle dynamic table size updates [1] properly [2]. Instead of fixing OkHttp or importing a prebuilt updated version, implement a new download client only using HttpURLConnection, which seems to work properly. [1] https://tools.ietf.org/html/rfc7541#section-6.3 [2] https://trac.nginx.org/nginx/ticket/1397 Change-Id: I3eedf7326f2017812c4a12d41f9ea028d255f7a8