QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 FlowSettingView.java 源代码,内容仅作参考
package com.tencent.mtt.external.setting.flow;
import android.content.Context;
import android.os.Bundle;
import android.os.Message;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.tencent.mtt.R;
import com.tencent.mtt.base.functionwindow.MttFunctionwindowProxy;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.stat.StatManager;
import com.tencent.mtt.browser.WebEngine;
import com.tencent.mtt.browser.homepage.facade.IHomePageService;
import com.tencent.mtt.browser.setting.manager.UserSettingManager;
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.external.setting.ISettingNotifyService;
import com.tencent.mtt.external.setting.facade.SettingView;
import com.tencent.mtt.external.tencentsim.facade.ITencentSimService;
import com.tencent.mtt.hippy.qb.modules.QBHippyUserSettingManager;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.setting.PublicSettingManager;
import com.tencent.mtt.view.setting.SettingItem;
import com.tencent.mtt.view.setting.SettingResCache;
import com.tencent.mtt.view.widget.QBRadioGroup;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import java.util.HashMap;
import qb.a.e;
import qb.a.f;
import qb.a.h;
public class FlowSettingView extends SettingView implements View.OnClickListener, QBRadioGroup.OnCheckedListener {
private SettingItem f59692a;
private SettingResCache f59693b;
private QBRadioGroup f59694c;
public FlowSettingView(Context context, Bundle bundle, MttFunctionwindowProxy mttFunctionwindowProxy) {
super(context);
this.f59693b = SettingResCache.a();
f();
}
public void b(int i) {
StatManager b2;
String str;
this.f59694c.setCheckedId(i);
if (i == 0) {
PublicSettingManager.a().a(true);
PublicSettingManager.a().b(false);
a(true);
b2 = StatManager.b();
str = "EIC08_0";
} else if (i == 1) {
PublicSettingManager.a().a(false);
PublicSettingManager.a().b(true);
a(true);
StatManager.b().c("BHN010");
b2 = StatManager.b();
str = "EIC08_1";
} else {
if (i != 2) {
return;
}
PublicSettingManager.a().a(false);
PublicSettingManager.a().b(false);
a(true);
StatManager.b().c("BHN011");
b2 = StatManager.b();
str = "EIC08_2";
}
b2.c(str);
}
public static void e() {
UserSettingManager.b().setInt("KeyImageQualityOption", 1);
WindowManager.a().g(1);
WindowManager.a().e(true);
UserSettingManager.b().c(true);
WindowManager.a().d(true);
UserSettingManager.b().d(false);
WindowManager.a().c(false);
UserSettingManager.b().b(WebEngine.e().o());
WindowManager.a().d(WebEngine.e().o());
WindowManager.a().M();
}
private void f() {
if (this.f59692a == null) {
this.f59692a = new SettingItem(getContext(), 101, this.f59693b);
this.f59692a.setId(68);
this.f59692a.setOnClickListener(this);
this.f59692a.a(0, z, 0, 0);
this.f59692a.setMainText(MttResources.l(R.string.bd7));
addView(this.f59692a);
}
ITencentSimService iTencentSimService = (ITencentSimService) QBContext.getInstance().getService(ITencentSimService.class);
if (iTencentSimService != null && iTencentSimService.iTencentSimStatus() != 0) {
this.f59692a.setSecondaryText(MttResources.l(h.aP));
}
h();
i();
j();
}
public int getCurrentAutoPlayMode() {
return QBHippyUserSettingManager.getInstance().getInt("feedsVideoAutoPlay", 1);
}
private void h() {
TextView textView = new TextView(getContext());
textView.setGravity(3);
textView.setTextSize(1, MttResources.r(MttResources.h(f.cD)));
textView.setTextColor(MttResources.c(e.M));
textView.setText(MttResources.l(R.string.bdr));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);
layoutParams.setMargins(MttResources.h(f.cT), MttResources.h(f.dj), 0, 0);
addView(textView, layoutParams);
QBRadioGroup a2 = a(new QBRadioGroup.OnCheckedListener() {
@Override
public void a(int i) {
int i2;
int homeFeedsUpdateMode = FlowSettingView.this.getHomeFeedsUpdateMode();
if (i == 0) {
StatManager.b().c("EIC1302_1");
i2 = 1;
} else if (i != 1) {
i2 = homeFeedsUpdateMode;
} else {
StatManager.b().c("EIC1302_2");
i2 = 2;
}
if (i2 != homeFeedsUpdateMode) {
PublicSettingManager.a().setInt("key_home_feeds_update_mode", i2);
((IHomePageService) QBContext.getInstance().getService(IHomePageService.class)).onSettingsChanged((byte) 1);
}
}
}, MttResources.l(R.string.bdi), MttResources.l(R.string.bdo));
ViewGroup.LayoutParams layoutParams2 = a2.getLayoutParams();
if (layoutParams2 instanceof FrameLayout.LayoutParams) {
FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) layoutParams2;
layoutParams3.topMargin = MttResources.h(R.dimen.a3q);
layoutParams3.rightMargin = 0;
a2.setLayoutParams(layoutParams2);
}
addView(a2);
int homeFeedsUpdateMode = getHomeFeedsUpdateMode();
if (homeFeedsUpdateMode == 1 || homeFeedsUpdateMode != 2) {
a2.setCheckedId(0);
} else {
a2.setCheckedId(1);
}
}
private void i() {
TextView textView = new TextView(getContext());
textView.setGravity(3);
textView.setTextSize(1, MttResources.r(MttResources.h(f.cD)));
textView.setTextColor(MttResources.c(e.M));
textView.setText(MttResources.l(R.string.bdx));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);
layoutParams.setMargins(MttResources.h(f.cT), MttResources.h(f.r), 0, 0);
addView(textView, layoutParams);
QBRadioGroup a2 = a(new QBRadioGroup.OnCheckedListener() {
@Override
public void a(int i) {
int i2;
if (i == 0) {
StatManager.b().c("EIC1304_1");
i2 = 1;
} else {
StatManager.b().c("EIC1304_0");
i2 = 0;
}
if (i2 != FlowSettingView.this.getCurrentAutoPlayMode()) {
FlowSettingView.this.setAutoPlayMode(i2);
}
}
}, MttResources.l(R.string.be0), MttResources.l(R.string.bdz));
a2.setId(3);
ViewGroup.LayoutParams layoutParams2 = a2.getLayoutParams();
if (layoutParams2 instanceof FrameLayout.LayoutParams) {
FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) layoutParams2;
layoutParams3.topMargin = MttResources.h(R.dimen.a3q);
layoutParams3.rightMargin = 0;
a2.setLayoutParams(layoutParams2);
}
addView(a2);
if (getCurrentAutoPlayMode() != 0) {
a2.setCheckedId(0);
} else {
a2.setCheckedId(1);
}
}
private void j() {
TextView textView = new TextView(getContext());
textView.setGravity(3);
textView.setTextSize(1, MttResources.r(MttResources.h(f.cD)));
textView.setTextColor(MttResources.c(e.M));
textView.setText(MttResources.l(R.string.bet));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);
layoutParams.setMargins(MttResources.h(f.cT), MttResources.h(f.r), 0, 0);
addView(textView, layoutParams);
String[] m = MttResources.m(R.array.x);
this.f59694c = a(this, MttResources.l(R.string.vw), m[0], m[1]);
addView(this.f59694c);
TextView m2 = m();
m2.setText(R.string.ac9);
addView(m2);
for (final int i = 0; i < this.f59694c.getChildCount(); i++) {
this.f59694c.a(i).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
FlowSettingView.this.b(i);
EventCollector.getInstance().onViewClicked(view);
}
});
}
boolean m3 = PublicSettingManager.a().m();
boolean n = PublicSettingManager.a().n();
if (m3) {
this.f59694c.setCheckedId(0);
return;
}
QBRadioGroup qBRadioGroup = this.f59694c;
if (n) {
qBRadioGroup.setCheckedId(1);
} else {
qBRadioGroup.setCheckedId(2);
}
}
public void setAutoPlayMode(int i) {
StatManager b2;
String str;
QBHippyUserSettingManager.getInstance().setInt("feedsVideoAutoPlay", i);
HashMap hashMap = new HashMap();
hashMap.put("feedsVideoAutoPlay", Integer.valueOf(i));
((ISettingNotifyService) QBContext.getInstance().getService(ISettingNotifyService.class)).notifyChange(hashMap);
if (i == 0) {
b2 = StatManager.b();
str = "EIC1304_0";
} else {
if (i != 1) {
return;
}
b2 = StatManager.b();
str = "EIC1304_1";
}
b2.c(str);
}
@Override
public void a(int i) {
}
public void a(boolean z) {
Message obtainMessage = ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).getAppEngineHandler().obtainMessage(21);
obtainMessage.arg1 = !z ? 1 : 0;
obtainMessage.sendToTarget();
}
public int getHomeFeedsUpdateMode() {
return PublicSettingManager.a().getInt("key_home_feeds_update_mode", 1);
}
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
if (view.getId() == 68) {
StatManager.b().c("EIC31");
ITencentSimService iTencentSimService = (ITencentSimService) QBContext.getInstance().getService(ITencentSimService.class);
if (iTencentSimService != null && iTencentSimService.iTencentSimStatus() >= 0) {
new UrlParams("https://qbfun.html5.qq.com?fromKingCard=1&channel=grzx&qb_version=9.4&addressbar=hide").b(1).e();
}
}
EventCollector.getInstance().onViewClicked(view);
}
}