4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1
以下内容为反编译后的 ConnectNetGuideXiaoMiDialog.java 源代码,内容仅作参考
package com.m4399.gamecenter.plugin.main.controllers.network;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.TextView;
import com.android.tools.r8.annotations.SynthesizedClassMap;
import com.framework.config.Config;
import com.framework.utils.DensityUtils;
import com.framework.utils.DeviceUtils;
import com.framework.utils.JSONUtils;
import com.m4399.gamecenter.plugin.main.R;
import com.m4399.gamecenter.plugin.main.config.GameCenterConfigKey;
import com.m4399.gamecenter.plugin.main.manager.stat.TraceHelper;
import com.m4399.gamecenter.plugin.main.utils.t;
import com.m4399.gamecenter.plugin.main.widget.web.WebViewLayout;
import com.umeng.analytics.pro.d;
import java.util.LinkedHashMap;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONObject;
@SynthesizedClassMap({$$Lambda$a$FCaMpkleVNadpp570y7_d585cKw.class, $$Lambda$a$Xg1KjFKGcvHnfXpYUKeNokWoFj0.class, $$Lambda$a$si0HCb_oTGdxNArPIKDTpiyag4.class})
@Metadata(d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0010\u0010\u001a\u001a\u00020\u001b2\u0006\u0010\u001c\u001a\u00020\u001dH\u0002J\b\u0010\u001e\u001a\u00020\u001bH\u0002J\b\u0010\u001f\u001a\u00020\u001bH\u0002J\b\u0010 \u001a\u00020\u001bH\u0016R\u001b\u0010\u0005\u001a\u00020\u00068BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\t\u0010\n\u001a\u0004\b\u0007\u0010\bR\u001b\u0010\u000b\u001a\u00020\f8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u000f\u0010\n\u001a\u0004\b\r\u0010\u000eR\u001b\u0010\u0010\u001a\u00020\u00118BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0014\u0010\n\u001a\u0004\b\u0012\u0010\u0013R\u001b\u0010\u0015\u001a\u00020\u00168BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0019\u0010\n\u001a\u0004\b\u0017\u0010\u0018¨\u0006!"}, d2 = {"Lcom/m4399/gamecenter/plugin/main/controllers/network/ConnectNetGuideXiaoMiDialog;", "Lcom/dialog/BaseDialog;", d.R, "Landroid/content/Context;", "(Landroid/content/Context;)V", "cbNotHint", "Landroid/widget/CheckBox;", "getCbNotHint", "()Landroid/widget/CheckBox;", "cbNotHint$delegate", "Lkotlin/Lazy;", "ivClose", "Landroid/widget/ImageView;", "getIvClose", "()Landroid/widget/ImageView;", "ivClose$delegate", "tvIKnow", "Landroid/widget/TextView;", "getTvIKnow", "()Landroid/widget/TextView;", "tvIKnow$delegate", "web", "Lcom/m4399/gamecenter/plugin/main/widget/web/WebViewLayout;", "getWeb", "()Lcom/m4399/gamecenter/plugin/main/widget/web/WebViewLayout;", "web$delegate", "clickStatics", "", "choice", "", "exposureStatics", "openSafeModePage", "show", "plugin_main_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class ConnectNetGuideXiaoMiDialog extends com.dialog.a {
private final Lazy brP;
private final Lazy brQ;
private final Lazy brR;
private final Lazy brS;
public ConnectNetGuideXiaoMiDialog(Context context) {
super(context, R.style.Theme_Dialog);
Intrinsics.checkNotNullParameter(context, "context");
this.brP = LazyKt.lazy(new Function0<ImageView>() {
{
super(0);
}
@Override
public final ImageView invoke() {
return (ImageView) ConnectNetGuideXiaoMiDialog.this.findViewById(R.id.iv_close);
}
});
this.brQ = LazyKt.lazy(new Function0<WebViewLayout>() {
{
super(0);
}
@Override
public final WebViewLayout invoke() {
return (WebViewLayout) ConnectNetGuideXiaoMiDialog.this.findViewById(R.id.webView_layout);
}
});
this.brR = LazyKt.lazy(new Function0<TextView>() {
{
super(0);
}
@Override
public final TextView invoke() {
return (TextView) ConnectNetGuideXiaoMiDialog.this.findViewById(R.id.tv_i_know);
}
});
this.brS = LazyKt.lazy(new Function0<CheckBox>() {
{
super(0);
}
@Override
public final CheckBox invoke() {
return (CheckBox) ConnectNetGuideXiaoMiDialog.this.findViewById(R.id.cb_no_hint);
}
});
setContentView(LayoutInflater.from(context).inflate(R.layout.m4399_dialog_connect_net_guide_xiaomi, (ViewGroup) null));
int identifier = context.getResources().getIdentifier("Social_Share_Dialog_Animations", "style", context.getPackageName());
Window window = getWindow();
if (window != null) {
window.setWindowAnimations(identifier);
}
yK().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
ConnectNetGuideXiaoMiDialog.a(ConnectNetGuideXiaoMiDialog.this, view);
}
});
yN().setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
ConnectNetGuideXiaoMiDialog.a(ConnectNetGuideXiaoMiDialog.this, compoundButton, z);
}
});
yM().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
ConnectNetGuideXiaoMiDialog.b(ConnectNetGuideXiaoMiDialog.this, view);
}
});
}
private final ImageView yK() {
Object value = this.brP.getValue();
Intrinsics.checkNotNullExpressionValue(value, "<get-ivClose>(...)");
return (ImageView) value;
}
private final WebViewLayout yL() {
Object value = this.brQ.getValue();
Intrinsics.checkNotNullExpressionValue(value, "<get-web>(...)");
return (WebViewLayout) value;
}
private final TextView yM() {
Object value = this.brR.getValue();
Intrinsics.checkNotNullExpressionValue(value, "<get-tvIKnow>(...)");
return (TextView) value;
}
private final CheckBox yN() {
Object value = this.brS.getValue();
Intrinsics.checkNotNullExpressionValue(value, "<get-cbNotHint>(...)");
return (CheckBox) value;
}
public static final void a(ConnectNetGuideXiaoMiDialog this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.dismiss();
this$0.cX("关闭");
}
public static final void a(ConnectNetGuideXiaoMiDialog this$0, CompoundButton compoundButton, boolean z) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Config.setValue(GameCenterConfigKey.NETWORK_XIAOMI_CONNECT_CHECK_DIALOG, Boolean.valueOf(!z));
if (z) {
this$0.cX("不再提示");
} else {
this$0.cX("取消不再提示");
}
}
public static final void b(ConnectNetGuideXiaoMiDialog this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.dismiss();
this$0.cX("我知道了");
}
@Override
public void show() {
if (((Boolean) Config.getValue(GameCenterConfigKey.NETWORK_XIAOMI_CONNECT_CHECK_DIALOG)).booleanValue()) {
JSONObject parseJSONObjectFromString = JSONUtils.parseJSONObjectFromString((String) Config.getValue(GameCenterConfigKey.MI_NETWORK_GUIDE));
if (JSONUtils.getBoolean("switch", parseJSONObjectFromString)) {
super.show();
Window window = getWindow();
if (window != null) {
WindowManager.LayoutParams attributes = window.getAttributes();
if (attributes != null) {
attributes.gravity = 80;
}
if (attributes != null) {
attributes.width = -1;
}
int deviceHeightPixels = DeviceUtils.getDeviceHeightPixels(getContext()) + t.getLayoutStatusBarHeight();
if (attributes != null) {
attributes.height = deviceHeightPixels - DensityUtils.dip2px(getContext(), 72.0f);
}
window.setAttributes(attributes);
}
String it = JSONUtils.getString("url", parseJSONObjectFromString);
Intrinsics.checkNotNullExpressionValue(it, "it");
if (!(it.length() > 0)) {
it = null;
}
if (it == null) {
it = "https://m.img4399.com/r/4399gameboxpages/android/pages/MIUIHelper.html";
}
yL().loadUrl(it);
yO();
}
}
}
private final void yO() {
LinkedHashMap linkedHashMap = new LinkedHashMap();
linkedHashMap.put("trace", TraceHelper.getTrace(getContext()));
com.m4399.gamecenter.plugin.main.helpers.t.onEvent("miui_guides_exposure", linkedHashMap);
}
private final void cX(String str) {
LinkedHashMap linkedHashMap = new LinkedHashMap();
linkedHashMap.put("choice", str);
linkedHashMap.put("trace", TraceHelper.getTrace(getContext()));
com.m4399.gamecenter.plugin.main.helpers.t.onEvent("miui_guides_click", linkedHashMap);
}
}