You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Update strings
This commit is contained in:
@@ -8,7 +8,6 @@ import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ContentProvider;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.topjohnwu.magisk.dummy.DummyActivity;
|
||||
import com.topjohnwu.magisk.dummy.DummyProvider;
|
||||
@@ -16,8 +15,6 @@ import com.topjohnwu.magisk.dummy.DummyReceiver;
|
||||
import com.topjohnwu.magisk.dummy.DummyService;
|
||||
import com.topjohnwu.magisk.obfuscate.Mapping;
|
||||
|
||||
import static com.topjohnwu.magisk.DownloadActivity.TAG;
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public class DelegateComponentFactory extends AppComponentFactory {
|
||||
|
||||
@@ -27,14 +24,12 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
@Override
|
||||
public Application instantiateApplication(ClassLoader cl, String className) {
|
||||
if (loader == null) loader = cl;
|
||||
Log.d(TAG, className);
|
||||
return new DelegateApplication(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Activity instantiateActivity(ClassLoader cl, String className, Intent intent)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
Log.d(TAG, className);
|
||||
if (delegate != null)
|
||||
return delegate.instantiateActivity(loader, Mapping.get(className), intent);
|
||||
return create(className, DummyActivity.class);
|
||||
@@ -43,7 +38,6 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
@Override
|
||||
public BroadcastReceiver instantiateReceiver(ClassLoader cl, String className, Intent intent)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
Log.d(TAG, className);
|
||||
if (delegate != null)
|
||||
return delegate.instantiateReceiver(loader, Mapping.get(className), intent);
|
||||
return create(className, DummyReceiver.class);
|
||||
@@ -52,7 +46,6 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
@Override
|
||||
public Service instantiateService(ClassLoader cl, String className, Intent intent)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
Log.d(TAG, className);
|
||||
if (delegate != null)
|
||||
return delegate.instantiateService(loader, Mapping.get(className), intent);
|
||||
return create(className, DummyService.class);
|
||||
@@ -61,7 +54,6 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
@Override
|
||||
public ContentProvider instantiateProvider(ClassLoader cl, String className)
|
||||
throws ClassNotFoundException, IllegalAccessException, InstantiationException {
|
||||
Log.d(TAG, className);
|
||||
if (loader == null) loader = cl;
|
||||
if (delegate != null)
|
||||
return delegate.instantiateProvider(loader, Mapping.get(className));
|
||||
@@ -73,7 +65,6 @@ public class DelegateComponentFactory extends AppComponentFactory {
|
||||
*/
|
||||
private <T> T create(String name, Class<? extends T> dummy)
|
||||
throws InstantiationException, IllegalAccessException {
|
||||
Log.d(TAG, "create " + name);
|
||||
try {
|
||||
return (T) loader.loadClass(name).newInstance();
|
||||
} catch (IllegalAccessException | InstantiationException | ClassNotFoundException ignored) {
|
||||
|
||||
Reference in New Issue
Block a user