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
Loading
Please register or sign in to comment