Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 74b4af53 authored by Billy Lau's avatar Billy Lau
Browse files

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
parent 99deef06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment