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

Refine keep rules for Java classes w/ native methods

The global keep rule for native methods allows stripping of such methods
if they're unreferenced in Java. However, because system_server
explicitly registers these methods from native code, stripping them in
Java can cause runtime issues. As such, conservatively keep all such
methods in system_server subpackages as long as the containing class is
also kept or referenced.

In practice, the difference is minimal, but this makes it easier to
integrate optional debug pathways that have JNI interop.

Bug: 246800015
Test: m services + inspect delta in services.jar
Change-Id: Id1f9ab707edff9b1911cdde6bdd4bc24ebff7e49
parent 8314a3e5
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