QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 ExitEditAfterSaveImpl.java 源代码,内容仅作参考
package com.tencent.mtt.external.reader.dex.base.services.impl;
import android.content.Context;
import android.view.View;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.external.reader.dex.base.ReaderConfig;
import com.tencent.mtt.external.reader.dex.base.services.ExitEditAfterSave;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.tool.FilePreferenceManager;
import com.tencent.mtt.view.dialog.alert.NewQBAlertDialogBuilder;
import com.tencent.mtt.view.dialog.alert.QBAlertDialog;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.ranges.RangesKt;
public final class ExitEditAfterSaveImpl implements ExitEditAfterSave {
public static final Companion f56958a = new Companion(null);
private int f56959b;
private final ReaderConfig f56960c;
public static final class Companion {
private Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
public ExitEditAfterSaveImpl(ReaderConfig readerConfig) {
Intrinsics.checkParameterIsNotNull(readerConfig, "readerConfig");
this.f56960c = readerConfig;
}
@Override
public void a() {
this.f56959b++;
this.f56959b = RangesKt.coerceAtMost(2, this.f56959b);
}
@Override
public void a(Context context) {
Intrinsics.checkParameterIsNotNull(context, "context");
if (this.f56960c.m() && !FilePreferenceManager.a().getBoolean("key_reader_save_guide_shown", false)) {
FilePreferenceManager.a().setBoolean("key_reader_save_guide_shown", true);
NewQBAlertDialogBuilder newQBAlertDialogBuilder = new NewQBAlertDialogBuilder();
newQBAlertDialogBuilder.a("文档已保存");
newQBAlertDialogBuilder.b("可在“文件>最近文档”查看");
newQBAlertDialogBuilder.b("https://m4.publicimg.browser.qq.com/publicimg/nav/filereader/file_save_guide.png", 840, 547);
newQBAlertDialogBuilder.c(false);
newQBAlertDialogBuilder.d("好的");
newQBAlertDialogBuilder.a("去看看", 1);
final QBAlertDialog a2 = newQBAlertDialogBuilder.a(context);
a2.setCanceledOnTouchOutside(true);
a2.h(true);
a2.a(new View.OnClickListener() {
@Override
public final void onClick(View v) {
EventCollector.getInstance().onViewClickedBefore(v);
Intrinsics.checkExpressionValueIsNotNull(v, "v");
if (v.getId() == 100) {
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("qb://tab/file?target=5&entry=true&callFrom=FT_DOC_SAVE&animation=itemAnimation&dstPath=" + UrlUtils.encode(this.c().t())));
}
QBAlertDialog.this.dismiss();
EventCollector.getInstance().onViewClicked(v);
}
});
a2.show();
}
}
@Override
public boolean b() {
return (this.f56960c.l() || this.f56960c.m()) && this.f56959b == 1;
}
public final ReaderConfig c() {
return this.f56960c;
}
}