From 084685546b936a9825c66d676ef925d64d4b4809 Mon Sep 17 00:00:00 2001 From: Jared Duke Date: Fri, 3 Jun 2022 11:14:24 -0700 Subject: [PATCH] Preserve EnclosingMethod+InnerClasses attributes These attributes may be used at runtime to generate simple names for classes. Add explicit Proguard rules to keep them, which preserves current behavior when transitioning to R8 full mode. While some of the downstream code referencing simple class names shouldn't assume consistency, the size cost is relatively small (~10KB). Test: atest CtsTileServiceTestCases (w/ R8 full mode) Bug: 233427840 Change-Id: I4518e2e919207221319eb5d8b0e5ba658b450124 --- packages/SystemUI/proguard.flags | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags index 3d2b573ff6c25..6ffd661636539 100644 --- a/packages/SystemUI/proguard.flags +++ b/packages/SystemUI/proguard.flags @@ -1,6 +1,9 @@ # Preserve line number information for debugging stack traces. -keepattributes SourceFile,LineNumberTable +# Preserve relationship information that can impact simple class naming. +-keepattributes EnclosingMethod,InnerClasses + -keep class com.android.systemui.recents.OverviewProxyRecentsImpl -keep class com.android.systemui.statusbar.car.CarStatusBar -keep class com.android.systemui.statusbar.phone.CentralSurfaces