From 64143c8db782d826da37f02fe3fe44d6bb621007 Mon Sep 17 00:00:00 2001 From: Christoffer Adamsen Date: Fri, 3 Jan 2025 06:58:23 -0800 Subject: SystemUI: Add keep rule for VendorServices constructor This constructor is looked up reflectively and should be kept explicitly. Future versions of R8 in full mode will no longer implicitly keep VendorServices. when VendorServices is kept. Bug: 356344563 Bug: 373579455 Test: existing Change-Id: I07d2b4c576b3e01a76875d7c02327fa5acab4660 --- packages/SystemUI/proguard_common.flags | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/proguard_common.flags b/packages/SystemUI/proguard_common.flags index 162d8aebfc62..02b2bcf8e40d 100644 --- a/packages/SystemUI/proguard_common.flags +++ b/packages/SystemUI/proguard_common.flags @@ -1,5 +1,11 @@ -include proguard_kotlin.flags --keep class com.android.systemui.VendorServices + +# VendorServices implements CoreStartable and may be instantiated reflectively in +# SystemUIApplication#startAdditionalStartable. +# TODO(b/373579455): Rewrite this to a @UsesReflection keep annotation. +-keep class com.android.systemui.VendorServices { + public void (); +} # Needed to ensure callback field references are kept in their respective # owning classes when the downstream callback registrars only store weak refs. -- cgit v1.2.3-59-g8ed1b