QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 DocTranslateResultPagePresenter.java 源代码,内容仅作参考
package com.tencent.mtt.file.page.doctranslate.resultpage;
import android.view.View;
import com.tencent.common.http.MttRequestBase;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.file.page.statistics.ToolStatHelper;
import com.tencent.mtt.file.pagecommon.filepick.base.EasyPagePresenterBase;
import com.tencent.mtt.nxeasy.page.EasyPageContext;
import com.tencent.mtt.view.dialog.alert.QBAlertDialog;
import com.tencent.mtt.view.dialog.alert.QBAlertDialogBase;
import com.tencent.mtt.view.dialog.alert.QBLinearDialogClickListener;
import com.tencent.mtt.view.dialog.alert.QBListDialog;
import com.tencent.mtt.view.dialog.alert.QbListDialogBuilder;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import java.util.ArrayList;
import java.util.Iterator;
import qb.a.e;
public class DocTranslateResultPagePresenter extends EasyPagePresenterBase {
DocTranslateResultView f60554a;
public DocTranslateResultPagePresenter(EasyPageContext easyPageContext, String str) {
super(easyPageContext);
this.f60554a = new DocTranslateResultView(easyPageContext, str);
a(this.f60554a);
}
protected void a(int i, ArrayList<String> arrayList) {
DocTranslateResultView docTranslateResultView;
String str;
if (i < arrayList.size()) {
String str2 = arrayList.get(i);
if ("导出为PDF".equals(str2)) {
ToolStatHelper.a("tools_center", "translate_document", "tool_116", this.p.g, this.p.h);
docTranslateResultView = this.f60554a;
str = "pdf";
} else if (!"导出为Word".equals(str2)) {
ToolStatHelper.a("tools_center", "translate_document", "tool_118", this.p.g, this.p.h);
this.p.f68798a.a(true);
return;
} else {
ToolStatHelper.a("tools_center", "translate_document", "tool_117", this.p.g, this.p.h);
docTranslateResultView = this.f60554a;
str = "docx";
}
docTranslateResultView.a(str);
}
}
protected void e() {
ToolStatHelper.a("tools_center", "translate_document", "tool_107", this.p.g, this.p.h);
final QBAlertDialog qBAlertDialog = new QBAlertDialog(this.p.f68800c, null, "继续翻译", 1, "退出", 3, null, 3, QBAlertDialogBase.BackGroundStyle.WHITE_WITHOUT_HEADER, true, MttRequestBase.REQUEST_NORMAL, -1, null, false);
qBAlertDialog.a(new View.OnClickListener() {
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
qBAlertDialog.dismiss();
int id = view.getId();
if (id == 100) {
ToolStatHelper.a("tools_center", "translate_document", "tool_108", DocTranslateResultPagePresenter.this.p.g, DocTranslateResultPagePresenter.this.p.h);
} else if (id != 101) {
qBAlertDialog.dismiss();
} else {
ToolStatHelper.a("tools_center", "translate_document", "tool_109", DocTranslateResultPagePresenter.this.p.g, DocTranslateResultPagePresenter.this.p.h);
DocTranslateResultPagePresenter.this.p.f68798a.a(true);
}
EventCollector.getInstance().onViewClicked(view);
}
});
qBAlertDialog.h(true);
qBAlertDialog.setCancelable(true);
qBAlertDialog.setCanceledOnTouchOutside(true);
qBAlertDialog.a("翻译即将完成,退出后将会影响翻译进度", true);
qBAlertDialog.show();
}
protected void f() {
final ArrayList arrayList = new ArrayList();
DocTranslateResultView docTranslateResultView = this.f60554a;
if (docTranslateResultView != null) {
if (docTranslateResultView.d()) {
arrayList.add("导出为PDF");
}
if (this.f60554a.e()) {
arrayList.add("导出为Word");
}
}
arrayList.add("确认退出");
String[] strArr = new String[arrayList.size()];
Iterator it = arrayList.iterator();
int i = 0;
while (it.hasNext()) {
strArr[i] = (String) it.next();
i++;
}
QbListDialogBuilder qbListDialogBuilder = new QbListDialogBuilder();
qbListDialogBuilder.a(false);
qbListDialogBuilder.a("https://static.res.qq.com/qbt/file/reader_dialog_when_exit_edit.png", MttResources.s(280), MttResources.s(149));
qbListDialogBuilder.a("是否导出翻译后的文档?");
qbListDialogBuilder.a(strArr);
final QBListDialog a2 = qbListDialogBuilder.a();
QBAlertDialog a3 = a2.a();
if (a3 != null) {
a3.h(true);
a3.setCancelable(true);
}
a2.a(true);
if (arrayList.size() > 2) {
a2.a(0, MttResources.c(e.f));
a2.a(1, MttResources.c(e.f));
} else {
a2.a(0, MttResources.c(e.f));
}
ToolStatHelper.a("tools_center", "translate_document", "tool_115", this.p.g, this.p.h);
a2.a(new QBLinearDialogClickListener() {
@Override
public void a(int i2) {
DocTranslateResultPagePresenter.this.a(i2, arrayList);
a2.c();
}
});
a2.b();
}
@Override
public boolean k() {
if (this.f60554a.f() || this.f60554a.g()) {
return false;
}
if (this.f60554a.c()) {
f();
return true;
}
e();
return true;
}
@Override
public void o() {
super.o();
this.f60554a.a();
}
}