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

Skip to content
Commit 8e741230 authored by Jared Duke's avatar Jared Duke
Browse files

Refactor weakly referenced callback keep rules

Annotate callback types that use weak reference semantics with a new
@WeaklyReferencedCallback annotation. Apply keep rules to fields that
implement types with this annotation, ensuring such fields are kept
during optimization and can provide a strong ref anchor at runtime.

Note that we only do this *only* on SysUISingleton-annotated classes,
as all other types should explicitly unregister any registered
callbacks, and aren't subject to fields being optimized away if only
referenced in the constructor.

This saves ~40-50s from the SystemUI R8 optimization pass.

Test: time m SystemUI + inspect dex diff
Bug: 300478836
Bug: 264686688
Change-Id: I6ca8b60460991c12436841a275e180beaf16cdb8
parent 1ebdb0ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment