You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Move things around
This commit is contained in:
@@ -37,7 +37,7 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
public Activity instantiateActivity(ClassLoader cl, String className, Intent intent)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
if (receiver != null)
|
||||
return receiver.instantiateActivity(DelegateClassLoader.cl, className, intent);
|
||||
return receiver.instantiateActivity(DynLoad.activeClassLoader, className, intent);
|
||||
return create(className, DownloadActivity.class);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
public BroadcastReceiver instantiateReceiver(ClassLoader cl, String className, Intent intent)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
if (receiver != null)
|
||||
return receiver.instantiateReceiver(DelegateClassLoader.cl, className, intent);
|
||||
return receiver.instantiateReceiver(DynLoad.activeClassLoader, className, intent);
|
||||
return create(className, DummyReceiver.class);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
public Service instantiateService(ClassLoader cl, String className, Intent intent)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
if (receiver != null)
|
||||
return receiver.instantiateService(DelegateClassLoader.cl, className, intent);
|
||||
return receiver.instantiateService(DynLoad.activeClassLoader, className, intent);
|
||||
return create(className, DummyService.class);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
public ContentProvider instantiateProvider(ClassLoader cl, String className)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
if (receiver != null)
|
||||
return receiver.instantiateProvider(DelegateClassLoader.cl, className);
|
||||
return receiver.instantiateProvider(DynLoad.activeClassLoader, className);
|
||||
return create(className, DummyProvider.class);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
throws IllegalAccessException, InstantiationException {
|
||||
try {
|
||||
// noinspection unchecked
|
||||
return (T) DelegateClassLoader.cl.loadClass(name).newInstance();
|
||||
return (T) DynLoad.activeClassLoader.loadClass(name).newInstance();
|
||||
} catch (ClassNotFoundException e) {
|
||||
return fallback.newInstance();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user