diff --git a/app/src/main/java/com/raincat/dolby_beta/hook/ProxyHook.java b/app/src/main/java/com/raincat/dolby_beta/hook/ProxyHook.java index 9e0bb3c2..a9ade8f3 100644 --- a/app/src/main/java/com/raincat/dolby_beta/hook/ProxyHook.java +++ b/app/src/main/java/com/raincat/dolby_beta/hook/ProxyHook.java @@ -3,6 +3,7 @@ import android.content.Context; import android.os.Bundle; + import com.raincat.dolby_beta.helper.ExtraHelper; import com.raincat.dolby_beta.helper.ScriptHelper; import com.raincat.dolby_beta.helper.SettingHelper; @@ -42,7 +43,6 @@ public class ProxyHook { private String fieldSSLSocketFactory; private String fieldHttpUrl = "url"; private String fieldProxy = "proxy"; - private final List whiteUrlList = Arrays.asList("song/enhance/player/url", "song/enhance/download/url","/package"); public ProxyHook(Context context, boolean isPlayProcess) { @@ -107,21 +107,17 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { }); } - if (!isPlayProcess) - findAndHookMethod("com.netease.cloudmusic.activity.LoadingActivity", context.getClassLoader(), "onCreate", Bundle.class, new XC_MethodHook() { - @Override - protected void afterHookedMethod(MethodHookParam param) { - ExtraHelper.setExtraDate(ExtraHelper.SCRIPT_STATUS, "0"); - if (SettingHelper.getInstance().getSetting(SettingHelper.proxy_master_key)) { - ScriptHelper.initScript(context, false); - if (SettingHelper.getInstance().getSetting(SettingHelper.proxy_server_key)) { - ScriptHelper.startHttpProxyMode(context); - } else { - ScriptHelper.startScript(); - } - } + if (!isPlayProcess) { + ExtraHelper.setExtraDate(ExtraHelper.SCRIPT_STATUS, "0"); + if (SettingHelper.getInstance().getSetting(SettingHelper.proxy_master_key)) { + ScriptHelper.initScript(context, false); + if (SettingHelper.getInstance().getSetting(SettingHelper.proxy_server_key)) { + ScriptHelper.startHttpProxyMode(context); + } else { + ScriptHelper.startScript(); } - }); + } + } } /** @@ -152,4 +148,4 @@ private void setProxy(Context context, Object client) throws Exception { sslSocketFactoryField.set(client, objectSSLSocketFactory); } } -} \ No newline at end of file +}