九游游戏中心HD v4.6.8.1版本的 MD5 值为:78c397802cc5ffdcc7f5502ede90502e
以下内容为反编译后的 TestPage.java 源代码,内容仅作参考
package cn.ninegame.gamemanager.settings.test;
import android.app.Activity;
import android.app.ActivityManager;
import android.os.Bundle;
import android.text.Editable;
import android.text.Selection;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.Spinner;
import android.widget.TextView;
import cn.ninegame.b.c.c;
import cn.ninegame.framework.NineGameClientApplication;
import cn.ninegame.gamemanager.NinegameBizFragment;
import cn.ninegame.gamemanagerhd.R;
import cn.ninegame.library.b.b;
import cn.ninegame.library.util.cc;
import org.json.JSONObject;
@cn.ninegame.genericframework.basic.w(a = {"base_biz_network_state_changed"})
@cn.ninegame.library.stat.f(a = "测试设置页面")
public class TestPage extends NinegameBizFragment implements View.OnClickListener {
static Activity f1385a;
private String[] C;
private boolean D = true;
private boolean E = true;
private boolean F = true;
private cn.ninegame.library.storage.simpledatastorage.e b;
private String[] c;
private String[] d;
private String[] e;
private String[] f;
private String[] g;
private String[] h;
private String[] i;
private String[] j;
public static boolean h(TestPage testPage) {
testPage.D = false;
return false;
}
public static boolean k(TestPage testPage) {
testPage.E = false;
return false;
}
public static boolean n(TestPage testPage) {
testPage.F = false;
return false;
}
@Override
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
if (this.k == null) {
this.k = layoutInflater.inflate(R.layout.settings_test, viewGroup, false);
this.b = cn.ninegame.gamemanager.startup.b.b.m.a().d();
this.c = this.o.getResources().getStringArray(R.array.api_host_list_values);
this.d = this.o.getResources().getStringArray(R.array.api_host_list_names);
this.e = this.o.getResources().getStringArray(R.array.account_host_list_values);
this.f = this.o.getResources().getStringArray(R.array.guild_api_host_list_values);
this.g = this.o.getResources().getStringArray(R.array.sns_api_host_list_values);
this.h = this.o.getResources().getStringArray(R.array.imbiz_api_host_list_values);
this.i = this.o.getResources().getStringArray(R.array.dsAddr_api_host_list_values);
this.j = this.o.getResources().getStringArray(R.array.dsPort_api_host_list_values);
this.C = this.o.getResources().getStringArray(R.array.pubAccount_api_host_list_values);
i();
((RelativeLayout) d(R.id.top_bar_linearlayout)).findViewById(R.id.btnHeaderBarBack).setOnClickListener(this);
String a2 = this.b.a("key_h5_html_zip_url", "http://ngmpreview.uae.ucweb.local/files/html-dev-4.2.9.0-740.zip");
EditText editText = (EditText) d(R.id.editH5ZipUrl);
editText.setText(a2);
d(R.id.btnUpgradeH5Zip).setOnClickListener(new g(this, editText));
String[] stringArray = this.o.getResources().getStringArray(R.array.h5_url_host_product_values);
String[] stringArray2 = this.o.getResources().getStringArray(R.array.h5_url_host_test_values);
EditText editText2 = (EditText) d(R.id.editText_h5_pattern1);
EditText editText3 = (EditText) d(R.id.editText_h5_replace1);
editText2.setText(stringArray[0]);
editText3.setText(stringArray2[0]);
EditText editText4 = (EditText) d(R.id.editText_h5_pattern2);
EditText editText5 = (EditText) d(R.id.editText_h5_replace2);
editText4.setText(stringArray[1]);
editText5.setText(stringArray2[1]);
d(R.id.btn_replace1).setOnClickListener(new bj(this, editText2, editText3));
d(R.id.btn_reuse1).setOnClickListener(new bk(this, editText2));
d(R.id.btn_replace2).setOnClickListener(new bl(this, editText4, editText5));
d(R.id.btn_reuse2).setOnClickListener(new bm(this, editText4));
RadioGroup radioGroup = (RadioGroup) d(R.id.radiogroup1);
RadioGroup radioGroup2 = (RadioGroup) d(R.id.radiogroup2);
RadioGroup radioGroup3 = (RadioGroup) d(R.id.account_radiogroup);
RadioGroup radioGroup4 = (RadioGroup) d(R.id.guild_radio_group);
RadioGroup radioGroup5 = (RadioGroup) d(R.id.sns_radio_group);
RadioGroup radioGroup6 = (RadioGroup) d(R.id.dsPort_radio_group);
Spinner spinner = (Spinner) d(R.id.imbiz_spinner);
Spinner spinner2 = (Spinner) d(R.id.dsAddr_spinner);
Spinner spinner3 = (Spinner) d(R.id.pubAccount_spinner);
((RadioButton) d(R.id.radiobutton1)).setText(this.d[0]);
((RadioButton) d(R.id.h5_radio1)).setText(this.d[0]);
((RadioButton) d(R.id.account_radio1)).setText(this.d[0]);
((RadioButton) d(R.id.guild_radio1)).setText(this.d[0]);
((RadioButton) d(R.id.sns_radio1)).setText(this.d[0]);
((RadioButton) d(R.id.dsPort_radio1)).setText(this.d[0]);
((RadioButton) d(R.id.radiobutton2)).setText(this.d[1]);
((RadioButton) d(R.id.h5_radio2)).setText(this.d[1]);
((RadioButton) d(R.id.account_radio2)).setText(this.d[1]);
((RadioButton) d(R.id.guild_radio2)).setText(this.d[1]);
((RadioButton) d(R.id.sns_radio2)).setText(this.d[1]);
((RadioButton) d(R.id.dsPort_radio2)).setText(this.d[1]);
((RadioButton) d(R.id.radiobutton3)).setText(this.d[2]);
((RadioButton) d(R.id.h5_radio3)).setText(this.d[2]);
((RadioButton) d(R.id.account_radio3)).setText(this.d[2]);
((RadioButton) d(R.id.guild_radio3)).setText(this.d[2]);
((RadioButton) d(R.id.sns_radio3)).setText(this.d[2]);
((RadioButton) d(R.id.dsPort_radio3)).setText(this.d[2]);
((RadioButton) d(R.id.radiobutton4)).setText(R.string.other);
((RadioButton) d(R.id.h5_radio4)).setText(R.string.other);
((RadioButton) d(R.id.account_radio4)).setText(R.string.other);
((RadioButton) d(R.id.guild_radio4)).setText(R.string.other);
((RadioButton) d(R.id.sns_radio4)).setText(R.string.other);
((RadioButton) d(R.id.dsPort_radio4)).setText(R.string.other);
EditText editText6 = (EditText) d(R.id.editText1);
EditText editText7 = (EditText) d(R.id.h5_edit);
EditText editText8 = (EditText) d(R.id.account_edit);
EditText editText9 = (EditText) d(R.id.guild_edit);
EditText editText10 = (EditText) d(R.id.sns_edit);
EditText editText11 = (EditText) d(R.id.et_im_biz);
EditText editText12 = (EditText) d(R.id.et_ds_addr);
EditText editText13 = (EditText) d(R.id.et_ds_port);
EditText editText14 = (EditText) d(R.id.et_public_account);
EditText editText15 = (EditText) d(R.id.et_live_biz);
EditText editText16 = (EditText) d(R.id.et_danmu_ip_biz);
EditText editText17 = (EditText) d(R.id.et_danmu_port_biz);
a(editText6);
h hVar = new h(this, editText6, editText8, editText9, editText10, editText13, editText7);
i iVar = new i(this, editText11, editText12, editText14);
radioGroup.setOnCheckedChangeListener(hVar);
radioGroup2.setOnCheckedChangeListener(hVar);
radioGroup3.setOnCheckedChangeListener(hVar);
radioGroup4.setOnCheckedChangeListener(hVar);
radioGroup5.setOnCheckedChangeListener(hVar);
radioGroup6.setOnCheckedChangeListener(hVar);
spinner.setOnItemSelectedListener(iVar);
spinner2.setOnItemSelectedListener(iVar);
spinner3.setOnItemSelectedListener(iVar);
editText6.setText(this.b.a("pref_setting_client_api_host", this.c[1]));
editText7.setText(this.b.a("pref_setting_client_h5_api_host", this.c[1]));
((Button) d(R.id.btn1)).setOnClickListener(new j(this, editText6));
d(R.id.h5_btn).setOnClickListener(new k(this, editText7));
editText8.setText(this.b.a("pref_setting_client_account_api_host", this.e[1]));
d(R.id.account_btn).setOnClickListener(new l(this, editText8));
editText9.setText(this.b.a("pref_setting_client_guild_api_host", this.f[1]));
d(R.id.guild_btn).setOnClickListener(new m(this, editText9));
editText10.setText(this.b.a("pref_setting_client_sns_api_host", this.g[1]));
d(R.id.sns_btn).setOnClickListener(new o(this, editText10));
editText11.setText(this.b.a("pref_setting_client_im_biz_api_host", this.h[1]));
d(R.id.btn_im_biz).setOnClickListener(new p(this, editText11));
editText12.setText(this.b.a("pref_setting_client_ds_api_host", this.i[1]));
d(R.id.btn_ds_chat).setOnClickListener(new q(this, editText12));
editText13.setText(this.b.a("pref_setting_client_ds_port_api_host", this.j[1]));
d(R.id.btn_ds_port).setOnClickListener(new r(this, editText13));
editText14.setText(this.b.a("pref_setting_client_public_account_biz_api_host", this.C[1]));
d(R.id.btn_public_account).setOnClickListener(new s(this, editText14));
editText15.setText(this.b.a("pref_setting_client_live_api_host", ((cn.ninegame.library.network.net.c.m) cn.ninegame.library.network.net.c.d.a(8)).a()));
d(R.id.btn_live_biz).setOnClickListener(new t(this, editText15));
editText16.setText(this.b.a("pref_setting_client_danmu_ip_api_host", getString(R.string.live_server_danmu_service_ip)));
d(R.id.btn_danmu_ip_biz).setOnClickListener(new u(this, editText16));
editText17.setText(this.b.a("pref_setting_client_danmu_port_api_host", getString(R.string.live_server_danmu_service_port)));
d(R.id.btn_danmu_port_biz).setOnClickListener(new v(this, editText17));
EditText editText18 = (EditText) d(R.id.editText2);
editText18.setText(String.valueOf(this.b.a("setting_state_time", Integer.valueOf(this.o.getResources().getInteger(R.integer.send_stat_interval)).intValue())));
a(editText18);
((Button) d(R.id.btn2)).setOnClickListener(new w(this, editText18));
EditText editText19 = (EditText) d(R.id.editText3);
editText19.setText(new StringBuilder().append(this.b.a("setting_notifications_time", Integer.valueOf(this.o.getResources().getInteger(R.integer.notifications_interval)).longValue())).toString());
a(editText19);
((Button) d(R.id.btn3)).setOnClickListener(new x(this, editText19));
EditText editText20 = (EditText) d(R.id.et_alarm_reset);
editText20.setText("300000");
a(editText20);
((Button) d(R.id.btn_alarm_reset)).setOnClickListener(new z(this));
((LinearLayout) d(R.id.ly4)).setOnClickListener(new aa(this));
((LinearLayout) d(R.id.lvEixt)).setOnClickListener(new ab(this));
((LinearLayout) d(R.id.lyShowInfo)).setOnClickListener(new ac(this));
((LinearLayout) d(R.id.lvInject)).setOnClickListener(new ay(this));
((LinearLayout) d(R.id.lyShowGuildTest)).setOnClickListener(new ad(this));
((LinearLayout) d(R.id.lyShowAccountLogout)).setOnClickListener(new ah(this));
d(R.id.btn_sid_expired).setOnClickListener(new ai(this));
d(R.id.tvAddRemoteNotification).setOnClickListener(new ak(this));
d(R.id.tvAddCommonNotification).setOnClickListener(new al(this));
d(R.id.tvJumpToMyPosts).setOnClickListener(new ao(this));
d(R.id.ll_topic_post).setOnClickListener(new ap(this));
d(R.id.tvJumpToToDoList).setOnClickListener(new aq(this));
d(R.id.tvJumpToGiftInterfacePage).setOnClickListener(new ar(this));
d(R.id.tvJumpToMessageCenter).setOnClickListener(new as(this));
d(R.id.tvJumpToMyCenter).setOnClickListener(new at(this));
d(R.id.tvJumpToGonghui).setOnClickListener(new av(this));
d(R.id.tvJumpToSettleGame).setOnClickListener(new aw(this));
EditText editText21 = (EditText) d(R.id.test_page_edit);
editText21.setText(cn.ninegame.gamemanager.startup.b.b.m.a().d().a("INITJUMPTOPAGE", ""));
d(R.id.test_page_jump_btn).setOnClickListener(new ax(this, editText21));
d(R.id.howTrumpetTest).setOnClickListener(new an(this));
d(R.id.ll_notice).setOnClickListener(new am(this));
d(R.id.tv_test_chat_page).setOnClickListener(new f(this));
d(R.id.tv_test_army_list_page).setOnClickListener(new e(this));
d(R.id.btn_test_guild_member_page).setOnClickListener(new d(this, (EditText) d(R.id.test_uc_id), (EditText) d(R.id.test_group_id), (EditText) d(R.id.test_guild_id)));
d(R.id.ll_open_simple_data_storage_test).setOnClickListener(new br(this));
d(R.id.switch_on_fps).setOnClickListener(new ae(this));
d(R.id.switch_off_fps).setOnClickListener(new af(this));
((TextView) d(R.id.emmaUploadUrl)).setText("http://100.84.74.65:9020/upload");
((TextView) d(R.id.emmaVersion)).setText(R.string.build);
d(R.id.emmaUploadBtn).setOnClickListener(new ag(this));
RadioGroup radioGroup7 = (RadioGroup) d(R.id.radiogroup_h5log);
switch (c.a.a()) {
case 0:
radioGroup7.check(R.id.radiobutton_h5log_w);
break;
case 1:
radioGroup7.check(R.id.radiobutton_h5log_open);
break;
case 2:
radioGroup7.check(R.id.radiobutton_h5log_close);
break;
}
radioGroup7.setOnCheckedChangeListener(new y(this));
((LinearLayout) d(R.id.useAndroidWV)).setOnClickListener(new aj(this));
((LinearLayout) d(R.id.useDefaultWV)).setOnClickListener(new au(this));
f1385a = getActivity();
d(R.id.main_java_crash_test).setOnClickListener(new az(this));
d(R.id.main_java_bg_crash_test).setOnClickListener(new ba(this));
d(R.id.oom_crash_test).setOnClickListener(new bc(this));
d(R.id.main_native_crash_test).setOnClickListener(new bd(this));
d(R.id.main_native_bg_crash_test).setOnClickListener(new be(this));
d(R.id.core_java_crash_test).setOnClickListener(new bg(this));
d(R.id.core_native_crash_test).setOnClickListener(new bi(this));
d(R.id.btnJumpTmallDetail).setOnClickListener(new bh(this));
d(R.id.btnJumpTmallUrl).setOnClickListener(new bp(this));
d(R.id.btnJumpTmallShop).setOnClickListener(new bq(this));
cn.ninegame.modules.account.f.a();
((EditText) d(R.id.editSid)).setText(String.valueOf(cn.ninegame.modules.account.f.f()));
d(R.id.btnCopySid).setOnClickListener(new bn(this));
cn.ninegame.modules.account.f.a();
((EditText) d(R.id.editTicket)).setText(String.valueOf(cn.ninegame.modules.account.f.h()));
d(R.id.btnCopyTicket).setOnClickListener(new bo(this));
d(R.id.ll_u3_debug_setting).setOnClickListener(new c(this));
b.a.a();
boolean a3 = cn.ninegame.library.b.b.a(getContext());
((TextView) d(R.id.tx_u3_switch)).setText(a3 ? "中转已开启" : "点击开启中转");
d(R.id.ll_u3_proxy_by_js).setOnClickListener(new n(this, a3));
}
return super.onCreateView(layoutInflater, viewGroup, bundle);
}
@Override
public void onNotify(cn.ninegame.genericframework.basic.r rVar) {
String str = rVar.f1701a;
char c = 65535;
switch (str.hashCode()) {
case -1050223973:
if (str.equals("base_biz_network_state_changed")) {
c = 0;
break;
}
break;
}
switch (c) {
case 0:
i();
break;
}
super.onNotify(rVar);
}
private void i() {
((TextView) d(R.id.tvNetwork)).setText("当前网络:" + cn.ninegame.library.network.b.a(NineGameClientApplication.a()).name());
}
private static void a(EditText editText) {
Editable text = editText.getText();
Selection.setSelection(text, text.length());
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.btnHeaderBarBack:
d_();
return;
default:
return;
}
}
public static void f() {
throw new RuntimeException("testpage crash in java");
}
public static int t(TestPage testPage) {
for (ActivityManager.RunningAppProcessInfo runningAppProcessInfo : ((ActivityManager) testPage.o.getSystemService("activity")).getRunningAppProcesses()) {
int i = runningAppProcessInfo.pid;
if (runningAppProcessInfo.processName.equals("com.wpd.game.popstar")) {
return i;
}
}
return 10086111;
}
public static JSONObject h() {
JSONObject e = cc.e(cn.ninegame.gamemanager.startup.b.b.m.a().d().a("prefs_key_h5_remote_url_host", (String) null));
if (e != null) {
return e;
}
return new JSONObject();
}
}