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

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

Introduce a LazyJniRegistrar helper class for system server

Currently, system server registers all JNI native method entrypoints
eagerly in SystemServer init. This has generally been fine, but doesn't
allow for any flexibility in the existence of Java classes defining
these entrypoints; it's assumed that all such entrypoints always exist.

The LazyJniRegistrar class allows lazy registration of JNI methods
for classes or services, shifting registration responsibilty to
the Java classes that use these entrypoints. This in turn allows
optional classes or services to be stripped from the build.

Start by migrating only a small subset of classes that may be
considered optional in the near future. Eventually, we might
consider migrating more classes to further streamline init and
avoid cascading initialization overhead.

Bug: 375264322
Test: m + presubmit
Flag: EXEMPT refactor
Change-Id: Ia2a0f52575cd47b0f418bb0439ab3a02d413b6ae
parent 2a9533b2
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