[hoststubgen] Fix log.iTime()
- iTime() didn't print the log, if the `block` had a return.
Let's just use a finally to fix it.
(I din't want to print the log if the code threw, but it's not a big deal.)
- Add vTime() and dTime() while I'm at it.
- Also make copyZipEntry() _slightly_ faster. InputStream.transferTo() still
uses `write(int)` to write byte-by-byte, but using it makes it a bit fast.
Although apparently copying entries-by-entires this way is still surprisingly
slow.
(HostStubGen doesn't use this method too often, but "ravenizer" will use
it more often, and that's where I noticed it.)
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
Flag: EXEMPT host side test change only
Bug: 292141694
Change-Id: Id2609d1b44055f92956207ee7f8b4c57e931ce44
2 files changed