QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 VerifyService.java 源代码,内容仅作参考
package com.tencent.mtt.browser.hometab.tablab.verify;
import android.text.TextUtils;
import android.view.View;
import com.tencent.common.manifest.EventEmiter;
import com.tencent.common.manifest.EventMessage;
import com.tencent.common.manifest.annotation.CreateMethod;
import com.tencent.common.manifest.annotation.EventReceiver;
import com.tencent.common.task.QBTask;
import com.tencent.mtt.base.functionwindow.ActivityHandler;
import com.tencent.mtt.boot.browser.splash.facade.ISplashManager;
import com.tencent.mtt.boot.facade.IBootService;
import com.tencent.mtt.browser.hometab.tablab.service.common.TabLabFileHelper;
import com.tencent.mtt.browser.hometab.tablab.service.common.TabLabPbHelper;
import com.tencent.mtt.browser.hometab.tablab.service.common.TabLabSettingHelper;
import com.tencent.mtt.browser.hometab.tablab.service.repository.ITabLabRepository;
import com.tencent.mtt.browser.window.IWebView;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.browser.window.WindowManager;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.view.dialog.newui.SimpleDialogBuilder;
import com.tencent.mtt.view.dialog.newui.dialog.DialogBase;
import com.tencent.mtt.view.dialog.newui.view.ViewOnClickListener;
import java.util.concurrent.Callable;
public class VerifyService implements ActivityHandler.ApplicationStateListener {
private volatile boolean f42090a = true;
private final Object f42091b = new Object();
private volatile Boolean f42092c = null;
private ActivityHandler.State f42093d;
public class AnonymousClass1 implements Callable<Void> {
final boolean f42094a;
AnonymousClass1(boolean z) {
this.f42094a = z;
}
@Override
public Void call() throws Exception {
int b2 = TabLabSettingHelper.a().b();
if (b2 == 0) {
return null;
}
TabLabPbHelper.a(b2, TabLabFileHelper.c(), new ITabLabRepository.CheckTemplateIsValidListener() {
@Override
public void a(boolean z) {
if (z) {
return;
}
if (!AnonymousClass1.this.f42094a) {
TabLabSettingHelper.a().f();
} else {
EventEmiter.getDefault().emit(new EventMessage("on_all_tab_custom_change"));
QBTask.b((Callable) new Callable<Void>() {
@Override
public Void call() throws Exception {
VerifyService.this.a();
return null;
}
});
}
}
});
return null;
}
}
private void a(boolean z) {
QBTask.a((Callable) new AnonymousClass1(z));
}
private void b() {
TabLabSettingHelper.a().h();
EventEmiter.getDefault().emit(new EventMessage("on_all_tab_custom_change"));
a();
}
public void a() {
if (((IBootService) QBContext.getInstance().getService(IBootService.class)).isSplashShowing()) {
synchronized (this.f42091b) {
if (this.f42092c == null) {
EventEmiter.getDefault().register(ISplashManager.SPLASH_HAS_END, this);
this.f42092c = true;
return;
}
}
}
SimpleDialogBuilder.a(ActivityHandler.b().n()).e("因功能调整,您选择的导航栏已下线。现已恢复到默认导航。带来不便,非常抱歉!").a("https://m4.publicimg.browser.qq.com/publicimg/nav/labmode/tab/dialog_pic.png").a((CharSequence) "知道了").a_(new ViewOnClickListener() {
@Override
public void onClick(View view, DialogBase dialogBase) {
dialogBase.dismiss();
}
}).c("我要反馈").c(new ViewOnClickListener() {
@Override
public void onClick(View view, DialogBase dialogBase) {
dialogBase.dismiss();
((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("https://bbs.mb.qq.com/mobilefb/fbTree?desc=%E5%AE%9E%E9%AA%8C%E5%AE%A4&levelinfos=83e61584-dcbe-4bf1-a008-23f08c483f30&tname=%E5%AE%9E%E9%AA%8C%E5%AE%A4&level=83e61584-dcbe-4bf1-a008-23f08c483f30&levelName=%E5%AE%9E%E9%AA%8C%E5%AE%A4&pl=%E8%AF%B7%E5%B0%BD%E5%8F%AF%E8%83%BD%E8%AF%A6%E7%BB%86%E7%9A%84%E6%8F%8F%E8%BF%B0%E4%BD%A0%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%8C%E5%A6%82%EF%BC%9A%E6%8F%90%E4%BE%9B%E7%BD%91%E9%A1%B5%E9%93%BE%E6%8E%A5%E3%80%81%E6%88%AA%E5%9B%BE%E7%AD%89%E4%BF%A1%E6%81%AF&dr=fb").d(true).b(1));
}
}).b(false).c(false).e();
}
@Override
public void onApplicationState(ActivityHandler.State state) {
IWebView u;
if (this.f42093d == ActivityHandler.State.background && state == ActivityHandler.State.foreground && !TextUtils.equals(WindowManager.a().v(), "qb://labmode/tab") && (u = WindowManager.a().u()) != null) {
a(u.isHomePage());
}
this.f42093d = state;
}
@EventReceiver(createMethod = CreateMethod.NEW, eventName = "com.tencent.mtt.browser.window.data.WindowInfo.onPageActive")
public void onSceneEnter(EventMessage eventMessage) {
IWebView u = WindowManager.a().u();
if (!this.f42090a) {
if (u != null && u.isHomePage() && TabLabSettingHelper.a().g()) {
b();
return;
}
return;
}
this.f42090a = false;
ActivityHandler.b().a(this);
if (u != null) {
if (u.isHomePage() && TabLabSettingHelper.a().g()) {
b();
} else {
a(u.isHomePage());
}
}
}
@EventReceiver(createMethod = CreateMethod.NONE, eventName = ISplashManager.SPLASH_HAS_END)
public void onSplashEnd(EventMessage eventMessage) {
EventEmiter.getDefault().unregister(ISplashManager.SPLASH_HAS_END, this);
synchronized (this.f42091b) {
if (this.f42092c != null) {
this.f42092c = null;
a();
}
}
}
}