WeChat.apk(点击下载) / SettingsSelectCreateAccount.java
package com.tencent.mm.plugin.setting.ui.setting;
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import bw3.k34;
import bw3.l34;
import bw3.nj4;
import bw3.sn5;
import com.tencent.mm.R;
import com.tencent.mm.plugin.account.ui.RegAffiliateAccountUI;
import com.tencent.mm.plugin.report.service.q;
import com.tencent.mm.protocal.GeneralControlWrapper;
import com.tencent.mm.protocal.JsapiPermissionWrapper;
import com.tencent.mm.sdk.platformtools.LocaleUtil;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.ui.base.preference.MMPreference;
import com.tencent.mm.ui.base.preference.Preference;
import com.tencent.mm.ui.base.preference.SummaryBelowPreference;
import com.tencent.mm.ui.t2;
import fp2.g;
import i14.j;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
import nf0.u0;
import p64.i0;
import vj.r;
import yf0.c;
import yf0.l0;
import yf0.l0$$e;
import yf0.y;
public class SettingsSelectCreateAccount extends MMPreference {
/* renamed from: e reason: collision with root package name */
public i0 f145315e;
/* renamed from: f reason: collision with root package name */
public int f145316f = 0;
/* renamed from: g reason: collision with root package name */
public String f145317g = null;
/* renamed from: h reason: collision with root package name */
public String f145318h = null;
public class a implements View.OnClickListener {
public a() {
}
public void onClick(View view) {
ArrayList arrayList = new ArrayList();
arrayList.add(view);
Object[] array = arrayList.toArray();
arrayList.clear();
j30.a.b("com/tencent/mm/plugin/setting/ui/setting/SettingsSelectCreateAccount$1", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V", this, array);
Intent intent = new Intent();
intent.putExtra("rawUrl", "https://support.weixin.qq.com/cgi-bin/mmsupport-bin/newreadtemplate?t=signup/secondaryid_faq");
intent.putExtra("showShare", false);
intent.putExtra("show_bottom", false);
intent.putExtra("needRedirect", false);
intent.putExtra("neverGetA8Key", true);
intent.putExtra("hardcode_jspermission", JsapiPermissionWrapper.f173510h);
intent.putExtra("hardcode_general_ctrl", GeneralControlWrapper.f173507e);
sv3.b.j(SettingsSelectCreateAccount.this.getContext(), "webview", "com.tencent.mm.plugin.webview.ui.tools.WebViewUI", intent, null);
q.INSTANCE.g(23530, SettingsSelectCreateAccount.this.f145318h, r.i(), 0, 2, 1001, 10103, null, Integer.valueOf(SettingsSelectCreateAccount.this.f145316f));
j30.a.g(this, "com/tencent/mm/plugin/setting/ui/setting/SettingsSelectCreateAccount$1", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V");
}
}
public class b implements MenuItem.OnMenuItemClickListener {
public b() {
}
public boolean onMenuItemClick(MenuItem menuItem) {
SettingsSelectCreateAccount.this.finish();
return false;
}
}
public class c implements l0$$e {
public c() {
}
@Override // yf0.l0$$e
public int callback(int i15, int i16, String str, yf0.c cVar, y yVar) {
if (i15 == 0 && i16 == 0) {
Intent intent = new Intent();
intent.putExtra("rawUrl", ((l34) cVar.f345549b.f345576a).f28096d);
intent.putExtra("showShare", false);
intent.putExtra("show_bottom", false);
sv3.b.n(SettingsSelectCreateAccount.this.getContext(), "webview", ".ui.tools.WebViewUI", intent, 702);
}
return 0;
}
}
public final void T7() {
c.b bVar = new c.b();
bVar.f345562d = 5298;
bVar.f345561c = "/cgi-bin/micromsg-bin/precheckaffiliatedacct";
k34 k342 = new k34();
k342.f26904e = this.f145318h;
g gVar = g.INSTANCE;
byte[] Xe = gVar.Xe();
sn5 sn5 = new sn5();
nj4 nj42 = new nj4();
nj42.d(Xe);
sn5.f36626f = nj42;
nj4 nj43 = new nj4();
nj43.d(gVar.Yk0());
sn5.f36630j = nj43;
nj4 nj44 = new nj4();
nj44.d(sn5.toByteArray());
k342.f26903d = nj44;
k342.f26905f = this.f145316f;
bVar.f345559a = k342;
bVar.f345560b = new l34();
l0.e(bVar.a(), new c(), false);
}
@Override // com.tencent.mm.ui.base.preference.MMPreference
public View getBottomView() {
LinearLayout linearLayout = (LinearLayout) t2.b(getContext()).inflate(R.layout.ckx, (ViewGroup) null);
linearLayout.findViewById(R.id.mq6).setOnClickListener(new a());
return linearLayout;
}
@Override // com.tencent.mm.ui.base.preference.MMPreference
public int getHeaderResourceId() {
return R.layout.cky;
}
@Override // com.tencent.mm.ui.base.preference.MMPreference
public int getResourceId() {
return this.f145316f == 0 ? R.layout.f366552cm2 : R.layout.f366551cm1;
}
@Override // androidx.activity.ComponentActivity, androidx.fragment.app.FragmentActivity, com.tencent.mm.ui.component.UIComponentActivity, com.tencent.mm.ui.MMActivity, com.tencent.mm.ui.MMFragmentActivity
public void onActivityResult(int i15, int i16, Intent intent) {
Bundle bundleExtra;
super.onActivityResult(i15, i16, intent);
if (i15 == 702) {
if (intent != null) {
Map map = (Map) intent.getBundleExtra("result_data").getSerializable("next_params");
if (map != null) {
this.f145317g = (String) map.get("ticket");
}
if (this.f145317g != null) {
bl0.a.c(this, getString(R.string.gbc, LocaleUtil.getApplicationLanguage(), xg0.a.e(this, "CN", getString(R.string.bli)), "reg", 1, 0), 703, false);
q.INSTANCE.g(23530, this.f145318h, r.i(), 0, 1, 1002, 0, null, Integer.valueOf(this.f145316f));
}
}
i0 i0Var = this.f145315e;
if (i0Var != null && i0Var.isShowing()) {
this.f145315e.dismiss();
}
} else if (i15 == 703) {
if (!(intent == null || (bundleExtra = intent.getBundleExtra("result_data")) == null || !bundleExtra.getString("go_next", "").equals("agree_privacy"))) {
Intent intent2 = new Intent(this, RegAffiliateAccountUI.class);
intent2.putExtra("RegTicket", this.f145317g);
intent2.putExtra("sessionID", this.f145318h);
intent2.putExtra("RegScene", this.f145316f);
startActivityForResult(intent2, 704);
}
i0 i0Var2 = this.f145315e;
if (i0Var2 != null && i0Var2.isShowing()) {
this.f145315e.dismiss();
}
} else if (i15 == 704) {
i0 i0Var3 = this.f145315e;
if (i0Var3 != null && i0Var3.isShowing()) {
this.f145315e.dismiss();
}
setResult(i16, intent);
finish();
}
}
@Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.tencent.mm.ui.component.UIComponentActivity, com.tencent.mm.ui.MMActivity, com.tencent.mm.hellhoundlib.activities.HellActivity, com.tencent.mm.ui.vas.VASActivity, com.tencent.mm.ui.MMFragmentActivity, com.tencent.mm.ui.base.preference.MMPreference
public void onCreate(Bundle bundle) {
this.f145316f = getIntent().getIntExtra("RegScene", 0);
super.onCreate(bundle);
setMMTitle("");
setActionbarColor(getContext().getResources().getColor(R.color.f357929c));
setBackGroundColorResource(R.color.aaw);
setBackGroundColorResource(R.color.aaw);
if (getListView() != null) {
int dimensionPixelSize = getContext().getResources().getDimensionPixelSize(R.dimen.f359087cz);
getListView().setPadding(dimensionPixelSize, 0, dimensionPixelSize, 0);
getListView().setBackgroundColor(getResources().getColor(R.color.aaw));
}
String str = System.currentTimeMillis() + "";
this.f145318h = str;
q.INSTANCE.g(23530, str, r.i(), 0, 1, 1001, 0, null, Integer.valueOf(this.f145316f));
setBackBtn(new b());
((SummaryBelowPreference) getPreferenceScreen().a("register_by_phone")).J = true;
SummaryBelowPreference summaryBelowPreference = (SummaryBelowPreference) getPreferenceScreen().a("register_by_weixin");
summaryBelowPreference.J = true;
if (this.f145316f == 0) {
summaryBelowPreference.M(getString(R.string.ixk, u0.l()));
return;
}
summaryBelowPreference.M(getString(R.string.ixj, u0.l()));
}
@Override // com.tencent.mm.ui.base.preference.MMPreference
public boolean onPreferenceTreeClick(k14.g gVar, Preference preference) {
String str = preference.f177766r;
if ("register_by_phone".equals(str)) {
q.INSTANCE.g(23530, this.f145318h, r.i(), 0, 2, 1001, 10101, null, Integer.valueOf(this.f145316f));
setResult(1);
finish();
} else if ("register_by_weixin".equals(str)) {
q qVar = q.INSTANCE;
Object[] objArr = new Object[8];
objArr[0] = this.f145318h;
objArr[1] = r.i();
objArr[2] = 0;
objArr[3] = 2;
objArr[4] = 1001;
objArr[5] = Integer.valueOf(this.f145316f == 0 ? 10102 : 10104);
objArr[6] = null;
objArr[7] = Integer.valueOf(this.f145316f);
qVar.g(23530, objArr);
try {
this.f145315e = j.Q(getContext(), getString(R.string.f367625yv), getString(R.string.f367656zq), true, true, null);
T7();
} catch (IOException e15) {
Log.printErrStackTrace("MicroMsg.SettingsSelectCreateAccount", e15, null, new Object[0]);
}
}
return false;
}
}