From fdab6d760025ca42a7ffae6142250fd9916cec86 Mon Sep 17 00:00:00 2001 From: Alan Stokes Date: Fri, 6 May 2022 18:35:12 +0100 Subject: [PATCH] Keep ArtStasLog write() functions Some of these functions are called from IsolatedCompilationMetrics, a class added to the system server classpath by the (non-updatabale) com.android.compos APEX. Without this they are stripped as apparently unused, leading to system server crashing when we try to call them. Bug: 231271783 Test: Stage APEX, observe no crash, job scheduled successfully Test: atest CompOsSigningHostTest#verifyArtUpgradeGeneratesAnyArtifacts Change-Id: I5ad0249b0aae87e98ebdd3deb6e8c58bfb691ebc Merged-In: I5ad0249b0aae87e98ebdd3deb6e8c58bfb691ebc --- services/proguard.flags | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/proguard.flags b/services/proguard.flags index 425da6c111776..bad02b47031c0 100644 --- a/services/proguard.flags +++ b/services/proguard.flags @@ -33,6 +33,11 @@ public (...); } +# Accessed from com.android.compos APEX +-keep,allowoptimization,allowaccessmodification class com.android.internal.art.ArtStatsLog { + public static void write(...); +} + # Binder interfaces -keep,allowoptimization,allowaccessmodification class * extends android.os.IInterface -keep,allowoptimization,allowaccessmodification class * extends android.os.IHwInterface