Удалить намерения в Смали - PullRequest
0 голосов
/ 27 ноября 2018

Есть такой метод, который я получил с помощью 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

1 Ответ

0 голосов
/ 27 ноября 2018

Просто замените

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

на

goto :goto_0

...