summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJared Duke <jdduke@google.com>2022-02-28 09:35:16 -0800
committerJared Duke <jdduke@google.com>2022-03-01 16:41:48 +0000
commit60d8aceb8c86d57bf07d24250ba41acc6fb5bbc8 (patch)
treede0cde5d330c31b9685b2d3fd745addc23529c40 /common
parent3c847edf51092e22bf17c0031b27847e06090da4 (diff)
Reland: Enable R8 code shrinking for system_server on Pixel
This change landed in ag/16941691 but was rolled back due to issues with stripping of CustomScrollView and PackageManager shell command support. That issue has since been fixed. Original change description: Opt in to whole-program Java optimizations via R8 for Pixel devices. This can be explicitly disabled during builds via `SYSTEM_OPTIMIZE_JAVA=false m`. Note that this change only enables code shrinking for system_server, and should not impact stack traces. Additional R8 optimizations will be enabled after broader improvements to retracing infrastructure. See go/aperf-system-r8-faq for additional details and guidance. Also note that R8 shrinking optimizations are implicitly disabled in ENG builds. Enabling for non-Pixel devices will proceed in stages as we flesh out infrastructure and validate with test populations. Results: services.jar (20MB -> 17MB) Bug: 210510433 Test: SYSTEM_OPTIMIZE_JAVA=true + atest CtsInstalledLoadingProgressHostTests CtsAutoFillServiceTestCases CtsAppSecurityHostTestCases CtsAppTestCases Change-Id: I7f64819a8d23a39e7afbb1a210c229f223855243
Diffstat (limited to 'common')
-rw-r--r--common/pixel-common-device.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/pixel-common-device.mk b/common/pixel-common-device.mk
index e04d772..4bb4398 100644
--- a/common/pixel-common-device.mk
+++ b/common/pixel-common-device.mk
@@ -27,6 +27,7 @@ BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/wifi_sniffer
PRODUCT_PACKAGES_DEBUG += wifi_perf_diag
BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/wifi_perf_diag
-# Enable whole-program R8 Java optimizations for SystemUI, but also
-# allow explicit overriding for testing and development.
+# Enable whole-program R8 Java optimizations for SystemUI and system_server,
+# but also allow explicit overriding for testing and development.
+SYSTEM_OPTIMIZE_JAVA ?= true
SYSTEMUI_OPTIMIZE_JAVA ?= true