mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-23 21:12:08 +00:00
Remove usage of AndroidX CoreComponentFactory
This commit is contained in:
parent
eadf6e8b96
commit
e9af773901
@ -7,6 +7,7 @@
|
|||||||
android:extractNativeLibs="true"
|
android:extractNativeLibs="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
android:multiArch="true"
|
android:multiArch="true"
|
||||||
|
tools:remove="android:appComponentFactory"
|
||||||
tools:ignore="UnusedAttribute,GoogleAppIndexingWarning">
|
tools:ignore="UnusedAttribute,GoogleAppIndexingWarning">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
@ -150,9 +150,13 @@ public class DynLoad {
|
|||||||
|
|
||||||
// Create the receiver component factory
|
// Create the receiver component factory
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && componentFactory != null) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && componentFactory != null) {
|
||||||
Object factory = cl.loadClass(appInfo.appComponentFactory).newInstance();
|
|
||||||
var delegate = (DelegateComponentFactory) componentFactory;
|
var delegate = (DelegateComponentFactory) componentFactory;
|
||||||
delegate.receiver = (AppComponentFactory) factory;
|
if (appInfo.appComponentFactory == null) {
|
||||||
|
delegate.receiver = new AppComponentFactory();
|
||||||
|
} else {
|
||||||
|
Object factory = cl.loadClass(appInfo.appComponentFactory).newInstance();
|
||||||
|
delegate.receiver = (AppComponentFactory) factory;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
activeClassLoader = cl;
|
activeClassLoader = cl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user