首页 > 解决方案 > 在 smali 中删除 Intent

问题描述

我通过 jadx 收到了这个方法:

public final void onResponse(Call<UpdaterUpdates> call, Response<UpdaterUpdates> response) {
    if (response.isSuccessful()) {
        try {
            UpdaterUpdates updaterUpdates = (UpdaterUpdates) response.body();
            int i = this.a.getPackageManager().getPackageInfo(this.a.getPackageName(), 0).versionCode;
            if (!this.a.getPackageName().equals(updaterUpdates.getPackageName())) {
                return;
            }
            if (!updaterUpdates.isIsMandatory() || i >= updaterUpdates.getVersionCode() || VERSION.SDK_INT < updaterUpdates.getMinSdk()) {
                d.a(this.a.getApplicationContext()).d(false);
                return;
            }
            d.a(this.a.getApplicationContext()).d(true);
            Intent intent = new Intent(this.a.getApplicationContext(), SmartNetUpdaterActivity.class);
            intent.setFlags(268468224);
            this.a.startActivity(intent);
        } catch (Throwable e) {
            a.a(e, e.getMessage(), new Object[0]);
        }
    }
}

在这里,我想评论一下意图本身。

如何在生成的 .smali 类中执行此操作?

这是我以 .smali 格式收到的代码-> Gist 中的链接

标签: javasmali

解决方案


只需更换

invoke-virtual {v1, v0}, Lcom/testProject/testProjectApplication;->startActivity(Landroid/content/Intent;)V

goto :goto_0


推荐阅读