Prevent optimization of common code between framework/sysui

This is a temporary fix to ensure that SystemUI builds code that is
consistent with common code that might be referneced in the the bootclasspath.
Note that a proper fix would be to entirely eliminate these duplicated classes,
but for now this avoids any related issues, and eliminates issues when
running coverage tests against optimized builds.

Bug: 219615928,222468116
Test: m -j EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true
  + validate successful coverage test runs
Change-Id: I67b7ad1d6f8e1fb2352652d452c620d195d5c0dc
diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags
index c97ebe8..e74b6c7 100644
--- a/packages/SystemUI/proguard.flags
+++ b/packages/SystemUI/proguard.flags
@@ -41,6 +41,14 @@
 -keep,allowoptimization,allowaccessmodification class com.android.systemui.dagger.Dagger** { !synthetic *; }
 -keep,allowoptimization,allowaccessmodification class com.android.systemui.tv.Dagger** { !synthetic *; }
 
+# Prevent optimization or access modification of any referenced code that may
+# conflict with code in the bootclasspath.
+# TODO(b/222468116): Resolve such collisions in the build system.
+-keepnames class android.**.nano.** { *; }
+-keepnames class com.android.**.nano.** { *; }
+-keepnames class com.android.internal.protolog.** { *; }
+-keepnames class android.hardware.common.** { *; }
+
 # Allows proguard to make private and protected methods and fields public as
 # part of optimization. This lets proguard inline trivial getter/setter methods.
 -allowaccessmodification