Do not proguard com.android.systemui.log

Defensively also add com.android.systemui.common

Bug: 280569676
Test: Manually checked crashlooping device
Change-Id: I4959d2853f7bedc3f699999085b8a32c19a23ece
This commit is contained in:
Hawkwood Glazier
2023-05-03 18:49:40 +00:00
parent ad4d41ba63
commit a3ebc6b013
3 changed files with 13 additions and 2 deletions

View File

@@ -34,6 +34,8 @@ java_library {
// If you add a static lib here, you may need to also add the package to the ClassLoaderFilter
// in PluginInstance. That will ensure that loaded plugins have access to the related classes.
// You should also add it to proguard_common.flags so that proguard does not remove the portions
// of the library which are used by the plugins but not by systemui itself.
static_libs: [
"androidx.annotation_annotation",
"PluginCoreLib",

View File

@@ -62,11 +62,17 @@
-keep class ** extends androidx.preference.PreferenceFragment
-keep class com.android.systemui.tuner.*
# The plugins subpackage acts as a shared library that might be referenced in
# The plugins, log & common subpackages act as shared libraries that might be referenced in
# dynamically-loaded plugin APKs.
-keep class com.android.systemui.plugins.** {
*;
}
-keep class com.android.systemui.log.** {
*;
}
-keep class com.android.systemui.common.** {
*;
}
-keep class com.android.systemui.fragments.FragmentService$FragmentCreator {
*;
}

View File

@@ -230,7 +230,10 @@ public class PluginInstance<T extends Plugin> implements PluginLifecycleManager
private ClassLoader getParentClassLoader(ClassLoader baseClassLoader) {
return new PluginManagerImpl.ClassLoaderFilter(
baseClassLoader, "com.android.systemui.log", "com.android.systemui.plugin");
baseClassLoader,
"com.android.systemui.common",
"com.android.systemui.log",
"com.android.systemui.plugin");
}
/** Returns class loader specific for the given plugin. */