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

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

Enable R8 code shrinking for system_server by default

Flip the setting that controls R8 shrinking for system_server from
opt-in to opt-out. This can be controlled by vendor makefiles and from
the command-line using the `SYSTEM_OPTIMIZE_JAVA` boolean build flag.

Note that this change only enables code shrinking for system_server,
and should not impact stack traces except for certain stack frames
involving synthetics.

Additional (vendor) code that is loaded dynamically into
system_server, that references system_server code, should use
system_server APIs that are expicitly annotated with
`@android.annotation.SystemApi`.

Additional (vendor) code added directly to services.jar,
which doesn't fall into existing keep patterns in the services
proguard.flags configuration and would otherwise be stripped, should be
annotated with `@com.android.internal.annotations.Keep`.

Results: services.jar (20MB -> 17MB)

Bug: 210510433
Test: atest
  CtsInstalledLoadingProgressHostTests
  CtsAutoFillServiceTestCases
  CtsAppSecurityHostTestCases
  CtsAppTestCases
Change-Id: Icc77c9451d9a4a83e02cb591693354988f8d0ec4
parent 1b89a427
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