+110
−0
+38
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
SystemUI never receives BACKGROUND level trim commmand - this means that
several caches (especially font) can stay around for a long time before
they reach their set limits and trigger a trim. This causes significant
increase in private memory in cases where many font variants are
allocated - for example when lockscreen clock is animated through
different font variations.
This adds a BACKGROUND trim command when SysUI goes idle after
transitioning to AoD or simply turning off the screen. This is the
closest SysUI has to "background" state where it can safely cleanup its
resources.
Bug: 275486055
Test: atest ResourceTrimmer
memory benchmark with LockscreenAodTransitionBenchmark showing
~20MB of descrease in RssAnon after a 30 iteration benchmark run
Change-Id: Ia4abd0d9c3cf3b3a71bdd31f1009f37b18c99ae9