Skip to content

Commit

Permalink
配适网易云音乐8.7.01
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxingran committed Mar 6, 2022
1 parent 874ef28 commit c3ed047
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/src/main/java/com/raincat/dolby_beta/hook/SettingHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,23 @@
* </pre>
*/
public class SettingHook {
private String SettingActivity;
private String switchViewName = "";
private TextView titleView, subView;
private LinearLayout dialogRoot, dialogProxyRoot, dialogBeautyRoot, dialogSidebarRoot;

private BroadcastReceiver broadcastReceiver;

public SettingHook(Context context) {
public SettingHook(Context context,int versionCode) {
//一切的前提,没这个页面连设置都进不去
Class<?> settingActivityClass = findClassIfExists("com.netease.cloudmusic.activity.SettingActivity", context.getClassLoader());
if(versionCode>=8007000)
{
SettingActivity="com.netease.cloudmusic.music.biz.setting.activity.SettingActivity";
}else
{
SettingActivity="com.netease.cloudmusic.activity.SettingActivity";
}
Class<?> settingActivityClass = findClassIfExists(SettingActivity, context.getClassLoader());
Field[] allFields = settingActivityClass.getDeclaredFields();
for (Field field : allFields) {
if (field.getType().getName().contains("Switch")) {
Expand Down

0 comments on commit c3ed047

Please sign in to comment.