这篇文章很枯燥,但是这篇文章能证明我是原创,全文没有配图,我也不会去解释为什么,希望大家理解。
Android版已经加壳了,TV版可能也撑不了几个版本了,大家且用且珍惜。
另外TV版没有毒瘤,没有VIP破解,只能是优化,并不存在去毒瘤,缓存更快,VIP破解啥的,这些都是噱头!
1、去除限制设备运行
修改类名:com.mh.tv.main.mvp.ui.activity.SplashActivity
修改过程: 将SplashActivity中onCreate方法中的判断设备类型删除,只保留以下几行代码。
换句话说,就是在onCreate 中 f()方法之前的代码全部删除即可。
f方法是混淆后方法名,每次混淆后可能名称会有所变化,大家修改的时候斟酌下。
[Asm] 纯文本查看 复制代码
.line 70
invoke-direct {p0}, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity;->f()V
.line 71
invoke-direct {p0}, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity;->j()V
.line 72
invoke-direct {p0}, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity;->k()V
.line 73
invoke-direct {p0}, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity;->g()V
2、去除欢迎页5s倒计时
这里的k()方法就是原方法initTimer(),搜索关键词:0x1388,将0x1388 改成0x0
0x1388 是十六进制 5000,也就是5s
修改类名:com.mh.tv.main.mvp.ui.activity.SplashActivity
修改过程:在k()中,注释掉:将5000ms改为0ms
Smali修改为如下所示:
[Asm] 纯文本查看 复制代码
.line 147
new-instance v6, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity$2;
#const-wide/16 v2, 0x1388
const-wide/16 v2, 0x0
const-wide/16 v4, 0x64
move-object v0, v6
move-object v1, p0
invoke-direct/range {v0 .. v5}, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity$2;-><init>(Lcom/mh/tv/main/mvp/ui/activity/SplashActivity;JJ)V
iput-object v6, p0, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity;->h:Landroid/os/CountDownTimer;
3、去除欢迎页的“倒计时”文本框
但是右上角还有一个倒计时的文本框,有强迫症的可以去掉。
搜索管检测词tvCountdown 下面有行代码
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
直接把v1改成v2,改完如下:
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
[Asm] 纯文本查看 复制代码 修改类名:com.mh.tv.main.mvp.ui.activity.SplashActivity
修改过程:在对应m()函数中包含showAdView(),将 this.tvCountdown.setVisibility(0);改为 this.tvCountdown.setVisibility(4);//335行
Smali修改为如下所示:
.line 276
iget-object v0, p0, Lcom/mh/tv/main/mvp/ui/activity/SplashActivity;->tvCountdown:Landroid/widget/TextView;
#invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V
4、去除升级
去除升级有俩地方,一个是主界面提示升级,二是设置界面提示升级
(1)主界面:
修改类名:com.mh.tv.main.mvp.ui.activity.MainActivity
修改过程:在a(boolean z, String str, String str2)中,将 其中的代码删除或者注释;
方法解释:这个a方法的原方法名是forcedUpgradeApp(boolean z, String str, String str2)
(2)设置界面
修改类名: com.mh.tv.main.mvp.presenter.SettingPresenter
修改过程:注释或者删除SettingPresenter$1中的a()中的内容
5、设置默认不缓存视频
电视内存本来就很小,我就将他关了
修改类名:MhApplicaiton中的初始化方法
找到c()方法,其实就是在return-void前,对Sharedpreference中的"local_cache"做一个初始化,这个需要添加代码
修改如下:
[Asm] 纯文本查看 复制代码 method private c()V
.registers 3
const-string v0, "clarity_id"
.line 64
invoke-static {p0, v0}, Lcom/jess/arms/c/c;->c(Landroid/content/Context;Ljava/lang/String;)I
move-result v0
const/4 v1, -0x1
if-ne v0, v1, :cond_f
const/4 v0, 0x2
const-string v1, "clarity_id"
.line 67
invoke-static {p0, v1, v0}, Lcom/jess/arms/c/c;->a(Landroid/content/Context;Ljava/lang/String;I)V
:cond_f
# return-void
##以下是添加的代码
const-string v0, "local_cache"
.line 64
invoke-static {p0, v0}, Lcom/jess/arms/c/c;->c(Landroid/content/Context;Ljava/lang/String;)I
move-result v0
const/4 v1, -0x1
if-ne v0, v1, :cond_z
const/4 v0, 0x1
const-string v1, "local_cache"
.line 67
invoke-static {p0, v1, v0}, Lcom/jess/arms/c/c;->a(Landroid/content/Context;Ljava/lang/String;I)V
:cond_z
return-void
.end method
6、去启动页面的广告
上面已经写了如何跳过5s倒计时,但是开屏依然有广告
修改类名:com.mh.tv.main.mvp.ui.activity.SplashActivity
修改过程:只保留a(long j, List<AdsResponse> list)方法中最后一行代码
关键词搜索Glide,launch_screen
7.调换“立即退出”和“再看一会”按钮
修改类名: com.mh.tv.main.widget.dialog.d
修改过程:
I.调换a()中的文字
关键词搜索\u518d\u770b\u4e00\u4f1a 和 \u7acb\u5373\u9000\u51fa
修改Smali代码如下:
[Asm] 纯文本查看 复制代码 .line 41
iget-object v0, p0, Lcom/mh/tv/main/widget/dialog/d;->a:Lcom/mh/tv/main/widget/view/UpdateBtnView;
const-string v1, "\u7acb\u5373\u9000\u51fa"
invoke-virtual {v0, v1}, Lcom/mh/tv/main/widget/view/UpdateBtnView;->setText(Ljava/lang/String;)V
.line 42
iget-object v0, p0, Lcom/mh/tv/main/widget/dialog/d;->b:Lcom/mh/tv/main/widget/view/UpdateBtnView;
const-string v1, "\u518d\u770b\u4e00\u4f1a"
invoke-virtual {v0, v1}, Lcom/mh/tv/main/widget/view/UpdateBtnView;->setText(Ljava/lang/String;)V
互换文字即可
II.调换b()的监听,将变量a和变量b的监听进行调换
原文:
iget-object v0, p0, Lcom/mh/tv/main/widget/dialog/d;->a:Lcom/mh/tv/main/widget/view/UpdateBtnView;
iget-object v0, p0, Lcom/mh/tv/main/widget/dialog/d;->b:Lcom/mh/tv/main/widget/view/UpdateBtnView;
将上面两句的a,b进行调换即可
Smali修后改如下:
[Asm] 纯文本查看 复制代码 method private b()V
.registers 3
.line 47
iget-object v0, p0, Lcom/mh/tv/main/widget/dialog/d;->b:Lcom/mh/tv/main/widget/view/UpdateBtnView;
new-instance v1, Lcom/mh/tv/main/widget/dialog/-$$Lambda$d$rBICJ9q2m1uBY9KH03RTyr-TZvo;
invoke-direct {v1, p0}, Lcom/mh/tv/main/widget/dialog/-$$Lambda$d$rBICJ9q2m1uBY9KH03RTyr-TZvo;-><init>(Lcom/mh/tv/main/widget/dialog/d;)V
invoke-virtual {v0, v1}, Lcom/mh/tv/main/widget/view/UpdateBtnView;->setOnclickListener1(Landroid/view/View$OnClickListener;)V
.line 50
iget-object v0, p0, Lcom/mh/tv/main/widget/dialog/d;->a:Lcom/mh/tv/main/widget/view/UpdateBtnView;
new-instance v1, Lcom/mh/tv/main/widget/dialog/-$$Lambda$d$v3zjWI5Ks7abPDhxajZIRUo83kQ;
invoke-direct {v1, p0}, Lcom/mh/tv/main/widget/dialog/-$$Lambda$d$v3zjWI5Ks7abPDhxajZIRUo83kQ;-><init>(Lcom/mh/tv/main/widget/dialog/d;)V
invoke-virtual {v0, v1}, Lcom/mh/tv/main/widget/view/UpdateBtnView;->setOnclickListener1(Landroid/view/View$OnClickListener;)V
return-void
.end method
7、去除未登录点击全屏放大
ok键不能放大也是修改这个类
修改类名:com.mh.tv.main.mvp.ui.selector.f.t
关键字login_tips,总共会有三处,只修改两处,第三处是有关收藏的(PS:改了不登录也不能使用收藏)
另外两处一个是点击全屏放大的,另一个是关联ok键
这里就是修改if语句,修改方法很多,以下指示其中一种
I. 全屏按钮:修改这个文件com.mh.tv.main.mvp.ui.selector.f.t$11
将跳转失效即可,
下面是修改之后的代码
[Asm] 纯文本查看 复制代码 .method public onClick(Landroid/view/View;)V
.registers 4
# .line 243
# iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t$11;->a:Lcom/mh/tv/main/mvp/ui/selector/f/t;
# invoke-static {p1}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->a(Lcom/mh/tv/main/mvp/ui/selector/f/t;)Landroid/content/Context;
# move-result-object p1
# invoke-static {p1}, Lcom/mh/tv/main/mvp/a;->a(Landroid/content/Context;)Z
# move-result p1
# if-eqz p1, :cond_1a
.line 244
iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t$11;->a:Lcom/mh/tv/main/mvp/ui/selector/f/t;
invoke-virtual {p1}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->t()Z
move-result p1
if-nez p1, :cond_3c
.line 245
iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t$11;->a:Lcom/mh/tv/main/mvp/ui/selector/f/t;
invoke-virtual {p1}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->f()V
#goto :goto_3c
# .line 247
# :cond_1a
# iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t$11;->a:Lcom/mh/tv/main/mvp/ui/selector/f/t;
# invoke-static {p1}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->a(Lcom/mh/tv/main/mvp/ui/selector/f/t;)Landroid/content/Context;
# move-result-object p1
# iget-object v0, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t$11;->a:Lcom/mh/tv/main/mvp/ui/selector/f/t;
# invoke-static {v0}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->a(Lcom/mh/tv/main/mvp/ui/selector/f/t;)Landroid/content/Context;
# move-result-object v0
# invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
# move-result-object v0
# sget v1, Lcom/mh/tv/main/R$string;->login_tips:I
# invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
# move-result-object v0
# invoke-static {p1, v0}, Lcom/mh/tv/main/utility/u;->a(Landroid/content/Context;Ljava/lang/String;)V
# .line 248
# iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t$11;->a:Lcom/mh/tv/main/mvp/ui/selector/f/t;
# invoke-static {p1}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->a(Lcom/mh/tv/main/mvp/ui/selector/f/t;)Landroid/content/Context;
# move-result-object p1
# invoke-static {p1}, Lcom/mh/tv/main/utility/t;->a(Landroid/content/Context;)V
:cond_3c
#:goto_3c
return-void
.end method
II. 修改这个文件com.mh.tv.main.mvp.ui.selector.f.t
修改过程也是将判断截断
改完的代码如下:
[Asm] 纯文本查看 复制代码 .method private synthetic d(Landroid/view/View;)V
.registers 4
# .line 222
# iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->c:Landroid/content/Context;
# invoke-static {p1}, Lcom/mh/tv/main/mvp/a;->a(Landroid/content/Context;)Z
# move-result p1
# if-eqz p1, :cond_12
.line 223
invoke-virtual {p0}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->t()Z
move-result p1
if-nez p1, :cond_28
.line 224
invoke-virtual {p0}, Lcom/mh/tv/main/mvp/ui/selector/f/t;->f()V
goto :goto_28
# .line 226
# :cond_12
# iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->c:Landroid/content/Context;
# iget-object v0, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->c:Landroid/content/Context;
# invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
# move-result-object v0
# sget v1, Lcom/mh/tv/main/R$string;->login_tips:I
# invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
# move-result-object v0
# invoke-static {p1, v0}, Lcom/mh/tv/main/utility/u;->a(Landroid/content/Context;Ljava/lang/String;)V
# .line 227
# iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->c:Landroid/content/Context;
# invoke-static {p1}, Lcom/mh/tv/main/utility/t;->a(Landroid/content/Context;)V
:cond_28
:goto_28
return-void
.end method
8、修复未登录只能看10分钟,
修改类名:com.mh.tv.main.mvp.ui.selecor.f.t
关键字free,clarity_id
这里也是使用if判断是否登录,去除即可
修改a(Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;)方法
修改完的代码如下:
[Asm] 纯文本查看 复制代码 method public a(Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;)V
.registers 6
.line 805
iput-object p1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->aa:Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;
.line 807
iget-object v0, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->c:Landroid/content/Context;
iget-object v1, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->W:Lcom/mh/tv/main/mvp/ui/bean/VideoBean;
invoke-virtual {v1}, Lcom/mh/tv/main/mvp/ui/bean/VideoBean;->getId()I
move-result v1
invoke-static {v0, v1}, Lcom/mh/tv/main/mvp/a;->a(Landroid/content/Context;I)V
.line 809
invoke-virtual {p1}, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;->getM3u8Format()Lcom/mh/tv/main/mvp/ui/bean/M3u8FormatBean;
move-result-object v0
.line 810
invoke-virtual {p1}, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;->clone()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;
# 不判断登录
# .line 812
# iget-object v2, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->c:Landroid/content/Context;
# invoke-static {v2}, Lcom/mh/tv/main/mvp/a;->a(Landroid/content/Context;)Z
# move-result v2
# if-eqz v2, :cond_36
.line 814
iget-object v2, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->c:Landroid/content/Context;
const-string v3, "clarity_id"
invoke-static {v2, v3}, Lcom/jess/arms/c/c;->c(Landroid/content/Context;Ljava/lang/String;)I
move-result v2
.line 815
invoke-virtual {v0, v2}, Lcom/mh/tv/main/mvp/ui/bean/M3u8FormatBean;->getPlayUrl(I)Ljava/lang/String;
move-result-object v0
.line 816
invoke-virtual {v1, v0}, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;->setDefault_url(Ljava/lang/String;)V
.line 818
invoke-static {v2}, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;->getClarityNum(I)Ljava/lang/String;
move-result-object v0
.line 819
invoke-virtual {v1, v0}, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;->setDefault_suffix(Ljava/lang/String;)V
goto :goto_42
# .line 821
# :cond_36
# invoke-virtual {v0}, Lcom/mh/tv/main/mvp/ui/bean/M3u8FormatBean;->getFree()Ljava/lang/String;
# move-result-object v0
# const-string v2, "free"
# .line 824
# invoke-virtual {v1, v0}, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;->setDefault_url(Ljava/lang/String;)V
# .line 825
# invoke-virtual {v1, v2}, Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;->setDefault_suffix(Ljava/lang/String;)V
.line 828
:goto_42
iget-object v0, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->w:Lcom/mh/tv/main/widget/media/IjkVideoView;
invoke-virtual {v0, v1}, Lcom/mh/tv/main/widget/media/IjkVideoView;->a(Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;)V
.line 829
iget-object v0, p0, Lcom/mh/tv/main/mvp/ui/selector/f/t;->L:Lcom/mh/tv/main/widget/media/MediaClarityView;
invoke-virtual {v0, p1}, Lcom/mh/tv/main/widget/media/MediaClarityView;->setClarity(Lcom/mh/tv/main/mvp/ui/bean/ClarityBean;)V
return-void
.end method
9、重置UUID,这里需要注入文件,如果软件在盒子上正常运行,下面可以不改,
如果提示,账号被屏蔽,请看下面的内容。
(1)首先去修改UUID生成的方法,
方法解释:方法里有两种方法,一种是获取deviceID
另一种是如果deviceID获取出现问题,则使用JAVA生成UUID,但是每次生成的都是不一样的
做法是生成后,存起来。
修改方法,跳过(注释掉)第一种方法,直接按照第二种方法生成ID
修改类: com.mh.tv.main.utility.b中的a(Context context) 方法
关键字:mhuuid
Smali代码如下:
[Asm] 纯文本查看 复制代码 .method public static a(Landroid/content/Context;)Ljava/lang/String;
.registers 4
.annotation build Landroid/annotation/SuppressLint;
value = {
"MissingPermission"
}
.end annotation
# .line 253
# invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
# move-result-object v0
# const-string v1, "android_id"
# invoke-static {v0, v1}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;
# move-result-object v0
# if-eqz v0, :cond_19
# .line 255
# invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
# move-result-object v0
# const-string v1, "9774d56d682e549c"
# .line 256
# invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
# move-result v1
# if-eqz v1, :cond_19
# const/4 v0, 0x0
# :cond_19
# if-eqz v0, :cond_21
# .line 285
# invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
# move-result v1
# if-eqz v1, :cond_50
.line 286
:cond_21
sget-object v0, Lcom/mh/tv/main/utility/q;->r:Ljava/lang/String;
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p0
const-string v0, "mhuuid"
const-string v1, ""
.line 287
invoke-interface {p0, v0, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v1, ""
if-ne v0, v1, :cond_50
.line 289
invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;
move-result-object v0
invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "-"
const-string v2, ""
.line 290
invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object v0
.line 291
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-string v1, "mhuuid"
.line 292
invoke-interface {p0, v1, v0}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
.line 294
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->commit()Z
:cond_50
return-object v0
.end method
(2)将下面的代码保存为InjectUtil.smali,放在 com/example/ 文件夹下:
[Asm] 纯文本查看 复制代码 .class public Lcom/example/injectsmali/InjectUtil;
.super Ljava/lang/Object;
.source "InjectUtil.java"
# direct methods
.method public constructor <init>()V
.registers 1
.line 7
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static resetUuid(Landroid/content/Context;)V
.registers 5
.param p0, "context" # Landroid/content/Context;
.line 11
const-string v0, "mhysName"
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object v0
.line 12
.local v0, "sharedPreferences":Landroid/content/SharedPreferences;
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v1
.line 13
.local v1, "edit":Landroid/content/SharedPreferences$Editor;
const-string v2, "mhuuid"
const-string v3, ""
invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
.line 14
invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z
.line 16
const-string v2, "\u91cd\u7f6e\u6210\u529f\uff0c\u8bf7\u52a1\u5fc5\u91cd\u542f\u8f6f\u4ef6\uff01"
const/4 v3, 0x1
invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v2
invoke-virtual {v2}, Landroid/widget/Toast;->show()V
.line 17
return-void
.end method
.method public static toast(Landroid/content/Context;Ljava/lang/String;)V
.registers 3
.param p0, "context" # Landroid/content/Context;
.param p1, "str" # Ljava/lang/String;
.line 21
const/4 v0, 0x1
invoke-static {p0, p1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
.line 22
return-void
.end method
然后在com.mh.tv.main.mvp.ui.activity.LoginActivity中
onViewClick方法中,在切换二维码监听的位置插入下面的代码
invoke-static {p0}, Lcom/example/injectsmali/InjectUtil;->resetUuid(Landroid/content/Context;)V
修改Smali代码如下:
[Asm] 纯文本查看 复制代码 method public onViewClicked(Landroid/view/View;)V
.registers 4
.annotation runtime Lbutterknife/OnClick;
value = {
0x7f0c0240,
0x7f0c00bd
}
.end annotation
.line 209
invoke-virtual {p1}, Landroid/view/View;->getId()I
move-result v0
.line 210
iget-object v1, p0, Lcom/mh/tv/main/mvp/ui/activity/LoginActivity;->f:Lcom/open/leanback23/widget/FocusHighlightHelper$BrowseItemFocusHighlight;
invoke-virtual {v1, p1}, Lcom/open/leanback23/widget/FocusHighlightHelper$BrowseItemFocusHighlight;->onItemClicked(Landroid/view/View;)V
.line 211
sget p1, Lcom/mh/tv/main/R$id;->tv_jump:I
if-ne v0, p1, :cond_14
const/4 p1, 0x0
.line 212
invoke-virtual {p0, p1}, Lcom/mh/tv/main/mvp/ui/activity/LoginActivity;->a(Z)V
.line 213
iput p1, p0, Lcom/mh/tv/main/mvp/ui/activity/LoginActivity;->d:I
goto :goto_2b
.line 214
:cond_14
sget p1, Lcom/mh/tv/main/R$id;->fl_qr:I
if-ne v0, p1, :cond_2b
.line 216
iget-object p1, p0, Lcom/mh/tv/main/mvp/ui/activity/LoginActivity;->ivLoadingView:Landroid/widget/ImageView;
invoke-virtual {p1}, Landroid/widget/ImageView;->isShown()Z
move-result p1
if-nez p1, :cond_2b
#
invoke-static {p0}, Lcom/example/injectsmali/InjectUtil;->resetUuid(Landroid/content/Context;)V
#
.line 217
iget p1, p0, Lcom/mh/tv/main/mvp/ui/activity/LoginActivity;->d:I
if-nez p1, :cond_28
.line 218
invoke-virtual {p0}, Lcom/mh/tv/main/mvp/ui/activity/LoginActivity;->e()V
goto :goto_2b
.line 220
:cond_28
invoke-virtual {p0}, Lcom/mh/tv/main/mvp/ui/activity/LoginActivity;->h()V
:cond_2b
:goto_2b
return-void
.end method |