Commit e9af7739 authored by topjohnwu's avatar topjohnwu

Remove usage of AndroidX CoreComponentFactory

parent eadf6e8b
......@@ -7,6 +7,7 @@
android:extractNativeLibs="true"
android:icon="@drawable/ic_launcher"
android:multiArch="true"
tools:remove="android:appComponentFactory"
tools:ignore="UnusedAttribute,GoogleAppIndexingWarning">
<activity
......
......@@ -150,10 +150,14 @@ public class DynLoad {
// Create the receiver component factory
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && componentFactory != null) {
Object factory = cl.loadClass(appInfo.appComponentFactory).newInstance();
var delegate = (DelegateComponentFactory) componentFactory;
if (appInfo.appComponentFactory == null) {
delegate.receiver = new AppComponentFactory();
} else {
Object factory = cl.loadClass(appInfo.appComponentFactory).newInstance();
delegate.receiver = (AppComponentFactory) factory;
}
}
activeClassLoader = cl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment