summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Timothy Yiu <tyiu@google.com> 2024-03-19 02:56:06 +0000
committer Timothy Yiu <tyiu@google.com> 2024-03-21 23:52:16 +0000
commit1149dbb04b5a367c46bcfa5fcc0083dc2767a8eb (patch)
treefcee0816998c860426cdbdf95b12b4b29a2f2c73
parent8ec1eb1edb03235fb39cc905fa286aebca2afec0 (diff)
Refine system service proguard rules
Refine proguard rules for system services to prepare for rolling out full system server R8 optimization. Added proguard rules to keep auto-generated Java aconfig flags to prevent Flag function from being inlined / removed since R8 do not have context on flags that are referenced outside of the module. Bug: 313546597 Change-Id: I184cd7a79acc7fa2d9db66438df1f0b50d951fd9 Test: Local build and boot with full system server optimization
-rw-r--r--services/proguard.flags5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/proguard.flags b/services/proguard.flags
index 88561b460b05..a01e7dc16147 100644
--- a/services/proguard.flags
+++ b/services/proguard.flags
@@ -54,7 +54,10 @@
-keep,allowoptimization,allowaccessmodification class android.app.admin.flags.FeatureFlagsImpl { *; }
-keep,allowoptimization,allowaccessmodification class com.android.server.input.NativeInputManagerService$NativeImpl { *; }
-keep,allowoptimization,allowaccessmodification class com.android.server.ThreadPriorityBooster { *; }
--keep,allowaccessmodification class android.app.admin.flags.Flags { *; }
+
+# Keep all aconfig Flag class as they might be statically referenced by other packages
+# An merge or inlining could lead to missing dependencies that cause run time errors
+-keepclassmembernames class android.**.Flags, com.android.**.Flags { public *; }
# Referenced via CarServiceHelperService in car-frameworks-service (avoid removing)
-keep public class com.android.server.utils.Slogf { *; }