TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 CouponActivity.java 源代码,内容仅作参考
package com.tencent.biz.coupon;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import com.tencent.biz.ProtoServlet;
import com.tencent.biz.pubaccount.PublicAccountBrowser;
import com.tencent.common.app.AppInterface;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.webview.swift.WebViewFragment;
import com.tencent.mobileqq.widget.IndexView;
import com.tencent.protofile.coupon.CouponProto;
import com.tencent.tim.R;
import java.util.Iterator;
import mqq.app.MobileQQ;
import mqq.app.NewIntent;
import org.json.JSONException;
import org.json.JSONObject;
public class CouponActivity extends PublicAccountBrowser {
static String f82322a = "http://web.p.qq.com/qqmpmobile/coupon/shop.html?_bid=108";
public static final String f82323b = "http://web.p.qq.com/qqmpmobile/coupon/mycoupons.html?_bid=108";
public int f3589a;
public CouponActivity() {
this.f10665a = CouponWebViewFragment.class;
}
@Override
public boolean doOnCreate(Bundle bundle) {
this.f3589a = getIntent().getIntExtra("from", 10);
return super.doOnCreate(bundle);
}
public class CouponWebViewFragment extends WebViewFragment {
boolean f3590a = false;
int f82324a = 0;
@Override
public boolean mo950a(Bundle bundle) {
String str;
JSONObject jSONObject;
String next;
String string = this.f95022a.getExtras().getString("url");
this.f82324a = this.f95022a.getIntExtra("from", 10);
this.f95022a.putExtra("webStyle", "noBottomBar");
if (TextUtils.isEmpty(string)) {
this.f95022a.putExtra("title", super.getResources().getString(R.string.f60803name_res_0x7f0a0960));
this.f3590a = true;
} else {
this.f95022a.removeExtra("title");
}
super.mo950a(bundle);
if (this.f3590a) {
StringBuffer stringBuffer = new StringBuffer();
try {
String stringExtra = this.f95022a.getStringExtra("jsonParams");
if (!TextUtils.isEmpty(stringExtra)) {
Iterator<String> keys = new JSONObject(stringExtra).keys();
while (keys.hasNext()) {
stringBuffer.append(IndexView.f95329b + keys.next() + "=" + jSONObject.get(next).toString());
}
}
} catch (JSONException e) {
}
if ((this.f82324a & 5) == 0) {
str = CouponActivity.f82322a + "&stype=2" + stringBuffer.toString();
} else {
str = CouponActivity.f82322a + stringBuffer.toString();
}
this.f95022a.putExtra("url", str);
}
this.f95022a.putExtra("from", (this.f82324a & 28) | 16);
f();
return true;
}
private void f() {
NewIntent newIntent = new NewIntent(super.getActivity(), ProtoServlet.class);
newIntent.putExtra("cmd", "CouponSvr.coup_markBizupdate");
newIntent.putExtra("data", new CouponProto.MarkBusinessFavourUpdateReq().toByteArray());
if (this.f34644a == null) {
this.f34644a = (AppInterface) MobileQQ.sMobileQQ.waitAppRuntime(null);
}
this.f34644a.startServlet(newIntent);
}
@Override
public void a(int i, int i2, Intent intent) {
super.a(i, i2, intent);
int i3 = 0;
if (intent != null && intent.getExtras() != null) {
i3 = intent.getExtras().getInt("toPage");
}
if (i3 != 0 && (this.f82324a & i3) == 0) {
Intent intent2 = new Intent();
intent2.putExtra("toPage", i3);
super.getActivity().setResult(-1, intent2);
super.getActivity().finish();
}
}
@Override
public String mo1050a() {
return this.f95022a.hasExtra("source") ? "PA MyCoupon" : "PA Coupon";
}
@Override
public void a(Intent intent, String str) {
super.a(this.f95022a, this.f34672o);
if (!this.f95022a.hasExtra("source")) {
this.f34648a.f34597a.setVisibility(8);
this.f34648a.f34615c.setVisibility(0);
this.f34648a.f34615c.setText(R.string.f60804name_res_0x7f0a0961);
this.f34648a.f34615c.setClickable(false);
return;
}
this.f34648a.f34597a.setVisibility(8);
this.f34648a.f34615c.setVisibility(8);
}
@Override
public int mo1048a(Bundle bundle) {
int mo1048a = super.mo1048a(bundle);
if (!this.f95022a.hasExtra("source")) {
this.f34648a.f34597a.setVisibility(8);
this.f34648a.f34615c.setVisibility(0);
this.f34648a.f34615c.setText(R.string.f60804name_res_0x7f0a0961);
this.f34648a.f34615c.setOnClickListener(this);
} else {
this.f95022a.removeExtra("source");
this.f34648a.f34597a.setVisibility(8);
this.f34648a.f34615c.setVisibility(8);
}
return mo1048a;
}
@Override
public void onClick(View view) {
if (view == this.f34648a.f34615c) {
if ((this.f82324a & 4) != 0) {
Intent intent = new Intent();
intent.putExtra(AppConstants.Key.co, true);
intent.putExtra("toPage", 1);
super.getActivity().setResult(-1, intent);
super.getActivity().finish();
return;
}
Intent intent2 = new Intent(super.getActivity(), CouponActivity.class);
intent2.putExtra("url", CouponActivity.f82323b);
intent2.putExtra("source", "2");
intent2.putExtra("from", (this.f82324a & 12) | 5);
super.getActivity().startActivityForResult(intent2, 100);
return;
}
super.onClick(view);
}
}
}