Files
frameworks_base/core/java/android/util
Billy Lau 74b4af53ca Fix potential OOM issues when APEXs are too large.
On low RAM devices, there can be potentially OOM issues when
APEXs are too large, causing large buffers to be allocated when
computing the SHA256 digest of those APEX packages.

This change introduces the usage of DigestInputStream with
different buffer sizes according to the state of device (whether
it is a low ram device or not) to cap the memory usage.

Buffer size is currently derived experimentally at either 1kB or
1MB.

Bug: 217596264
Test: Manual.
Change-Id: I1964ef9d7047496a758c7f427910f116be89fc51
2022-02-16 14:16:19 -08:00
..
…
2021-07-19 13:10:23 -07:00
…
2021-04-29 14:09:18 +01:00
…
…
…