正在查看: 95爱播免登录版 v3.1.9 应用的 AliRechargeActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 AliRechargeActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.alipay.sdk.app.PayTask;
import com.mifeng.ui.R;
import com.showself.domain.RechargeValue;
import com.showself.service.g;
import com.showself.utils.Utils;
import com.showself.utils.r0;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.List;
public class AliRechargeActivity extends com.showself.ui.c {
private String a;
private int b;
private int c;
private int d;
private List<RechargeValue> f2533e;
private com.r.b.d f2534f;
private ListView f2535g;
View.OnClickListener f2536h = new b();
private Handler f2537i = new c();
class a implements Runnable {
final String a;
a(String str) {
this.a = str;
}
@Override
public void run() {
String pay = new PayTask(AliRechargeActivity.this).pay(URLDecoder.decode(this.a), true);
Message message = new Message();
message.what = 0;
message.obj = pay;
AliRechargeActivity.this.f2537i.sendMessage(message);
}
}
class b implements View.OnClickListener {
b() {
}
@Override
public void onClick(View view) {
int id = view.getId();
if (id == 2131296486) {
AliRechargeActivity.this.finish();
} else {
if (id != 2131299245) {
return;
}
RechargeValue rechargeValue = (RechargeValue) view.getTag();
AliRechargeActivity.this.d = rechargeValue.getProduct_id();
AliRechargeActivity.this.D();
}
}
}
class c extends Handler {
c() {
}
@Override
public void handleMessage(Message message) {
try {
String str = (String) message.obj;
if (message.what == 0) {
String trim = str.substring(str.indexOf("resultStatus={") + 14, str.indexOf("};memo=")).trim();
boolean contains = str.contains("success=\"true\"");
if ("9000".equals(trim) && contains) {
AliRechargeActivity.this.finish();
} else {
Utils.Y0(AliRechargeActivity.this, R.string.pay_failed);
}
}
super.handleMessage(message);
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
private void C() {
HashMap hashMap = new HashMap();
hashMap.put("type", Integer.valueOf(this.b));
hashMap.put("category", Integer.valueOf(this.c));
addTask(new com.showself.service.f(10075, hashMap), this);
}
public void D() {
HashMap hashMap = new HashMap();
hashMap.put("fuid", Integer.valueOf(r0.y(this).getUserId()));
hashMap.put("type", Integer.valueOf(this.b));
hashMap.put("category", Integer.valueOf(this.c));
hashMap.put("product_id", Integer.valueOf(this.d));
hashMap.put("alipay", 1);
addTask(new com.showself.service.f(10076, hashMap), this);
Utils.U0(this);
}
@Override
public void init() {
TextView textView = (TextView) findViewById(R.id.tv_nav_title);
Button button = (Button) findViewById(R.id.btn_nav_left);
textView.setText(this.a);
this.f2535g = (ListView) findViewById(R.id.lv_live_address_content);
button.setOnClickListener(this.f2536h);
com.r.b.d dVar = new com.r.b.d(this, this.f2536h);
this.f2534f = dVar;
this.f2535g.setAdapter((ListAdapter) dVar);
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.recharge_list);
this.a = getIntent().getStringExtra("title");
this.b = getIntent().getIntExtra("type", 116);
this.c = getIntent().getIntExtra("category", 1);
init();
C();
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onStop() {
super.onStop();
}
@Override
public void refresh(Object... objArr) {
Utils.n(this);
int intValue = ((Integer) objArr[0]).intValue();
HashMap hashMap = (HashMap) objArr[1];
if (hashMap != null) {
int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
String str = (String) hashMap.get(com.showself.net.e.o1);
if (intValue != 10075) {
if (intValue == 10076) {
if (intValue2 == com.showself.net.e.m1) {
Integer num = (Integer) hashMap.get("ret");
String str2 = (String) hashMap.get("retmsg");
if (num == null || num.intValue() != 0) {
Utils.Z0(this, str2);
} else {
new Thread(new a(str2)).start();
}
} else {
Utils.Z0(this, str);
}
}
} else if (intValue2 == com.showself.net.e.m1) {
List<RechargeValue> list = (List) hashMap.get("recharge_list");
this.f2533e = list;
if (list != null && list.size() > 0) {
this.f2534f.a(this.f2533e);
}
} else {
Utils.Z0(this, str);
}
}
g.i(this);
}
}