Loading packages/SystemUI/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,9 @@ android_library { "LowLightDreamLib", "motion_tool_lib", ], libs: [ "keepanno-annotations", ], manifest: "AndroidManifest.xml", javacflags: ["-Adagger.fastInit=enabled"], Loading Loading @@ -466,6 +469,7 @@ android_library { "android.test.runner", "android.test.base", "android.test.mock", "keepanno-annotations", ], kotlincflags: ["-Xjvm-default=all"], aaptflags: [ Loading Loading @@ -497,6 +501,9 @@ android_app { static_libs: [ "SystemUI-tests-base", ], libs: [ "keepanno-annotations", ], aaptflags: [ "--extra-packages", "com.android.systemui", Loading packages/SystemUI/proguard_common.flags +0 −3 Original line number Diff line number Diff line -keep class com.android.systemui.VendorServices # the `#inject` methods are accessed via reflection to work on ContentProviders -keepclassmembers class * extends com.android.systemui.dagger.SysUIComponent { void inject(***); } # Needed to ensure callback field references are kept in their respective # owning classes when the downstream callback registrars only store weak refs. # TODO(b/264686688): Handle these cases with more targeted annotations. Loading packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactoryBase.kt +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ import android.content.Intent import android.util.Log import androidx.core.app.AppComponentFactory import com.android.systemui.dagger.ContextComponentHelper import com.android.systemui.dagger.SysUIComponent import com.android.tools.r8.keepanno.annotations.KeepTarget import com.android.tools.r8.keepanno.annotations.UsesReflection import java.lang.reflect.InvocationTargetException import java.util.concurrent.ExecutionException import javax.inject.Inject Loading Loading @@ -88,6 +91,7 @@ abstract class SystemUIAppComponentFactoryBase : AppComponentFactory() { return app } @UsesReflection(KeepTarget(extendsClassConstant = SysUIComponent::class, methodName = "inject")) override fun instantiateProviderCompat(cl: ClassLoader, className: String): ContentProvider { val contentProvider = super.instantiateProviderCompat(cl, className) if (contentProvider is ContextInitializer) { Loading Loading
packages/SystemUI/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,9 @@ android_library { "LowLightDreamLib", "motion_tool_lib", ], libs: [ "keepanno-annotations", ], manifest: "AndroidManifest.xml", javacflags: ["-Adagger.fastInit=enabled"], Loading Loading @@ -466,6 +469,7 @@ android_library { "android.test.runner", "android.test.base", "android.test.mock", "keepanno-annotations", ], kotlincflags: ["-Xjvm-default=all"], aaptflags: [ Loading Loading @@ -497,6 +501,9 @@ android_app { static_libs: [ "SystemUI-tests-base", ], libs: [ "keepanno-annotations", ], aaptflags: [ "--extra-packages", "com.android.systemui", Loading
packages/SystemUI/proguard_common.flags +0 −3 Original line number Diff line number Diff line -keep class com.android.systemui.VendorServices # the `#inject` methods are accessed via reflection to work on ContentProviders -keepclassmembers class * extends com.android.systemui.dagger.SysUIComponent { void inject(***); } # Needed to ensure callback field references are kept in their respective # owning classes when the downstream callback registrars only store weak refs. # TODO(b/264686688): Handle these cases with more targeted annotations. Loading
packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactoryBase.kt +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ import android.content.Intent import android.util.Log import androidx.core.app.AppComponentFactory import com.android.systemui.dagger.ContextComponentHelper import com.android.systemui.dagger.SysUIComponent import com.android.tools.r8.keepanno.annotations.KeepTarget import com.android.tools.r8.keepanno.annotations.UsesReflection import java.lang.reflect.InvocationTargetException import java.util.concurrent.ExecutionException import javax.inject.Inject Loading Loading @@ -88,6 +91,7 @@ abstract class SystemUIAppComponentFactoryBase : AppComponentFactory() { return app } @UsesReflection(KeepTarget(extendsClassConstant = SysUIComponent::class, methodName = "inject")) override fun instantiateProviderCompat(cl: ClassLoader, className: String): ContentProvider { val contentProvider = super.instantiateProviderCompat(cl, className) if (contentProvider is ContextInitializer) { Loading