TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 TroopBarReplyActivity.java 源代码,内容仅作参考
package com.tencent.mobileqq.troop.activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.RelativeLayout;
import com.tencent.biz.ProtoServlet;
import com.tencent.biz.common.util.HttpUtil;
import com.tencent.biz.common.util.ImageUtil;
import com.tencent.image.URLDrawable;
import com.tencent.image.URLImageView;
import com.tencent.mobileqq.WebSsoBody;
import com.tencent.mobileqq.activity.aio.PlusPanel;
import com.tencent.mobileqq.activity.aio.PlusPanelAdapter;
import com.tencent.mobileqq.activity.aio.audiopanel.CommonRecordSoundPanel;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.IphoneTitleBarActivity;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.app.soso.SosoInterface;
import com.tencent.mobileqq.emoticonview.EmoticonCallback;
import com.tencent.mobileqq.emoticonview.EmoticonInfo;
import com.tencent.mobileqq.emoticonview.SystemAndEmojiEmoticonInfo;
import com.tencent.mobileqq.emoticonview.SystemEmoticonPanel;
import com.tencent.mobileqq.filemanager.util.FileUtil;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.troop.activity.TroopBarPublishActivity;
import com.tencent.mobileqq.troop.activity.TroopBarPublishUtils;
import com.tencent.mobileqq.troop.data.AudioInfo;
import com.tencent.mobileqq.troop.data.MediaInfo;
import com.tencent.mobileqq.troop.data.TroopBarPOI;
import com.tencent.mobileqq.troop.utils.HttpWebCgiAsyncTask;
import com.tencent.mobileqq.troop.utils.TroopBarUtils;
import com.tencent.mobileqq.troop.utils.TroopTopicMgr;
import com.tencent.mobileqq.troop.widget.PublishItemContainer;
import com.tencent.mobileqq.util.DisplayUtil;
import com.tencent.mobileqq.utils.DialogUtil;
import com.tencent.mobileqq.utils.JumpAction;
import com.tencent.mobileqq.utils.LogTag;
import com.tencent.mobileqq.utils.QQCustomDialog;
import com.tencent.mobileqq.widget.InputMethodRelativeLayout;
import com.tencent.mobileqq.widget.QQProgressDialog;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.qphone.base.util.BaseApplication;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.util.InputMethodUtil;
import com.tencent.widget.ActionSheet;
import java.io.File;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.HashMap;
import mqq.app.AppRuntime;
import mqq.app.NewIntent;
import mqq.manager.TicketManager;
import mqq.util.WeakReference;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class TroopBarReplyActivity extends IphoneTitleBarActivity implements TextWatcher, View.OnClickListener, EmoticonCallback, HttpWebCgiAsyncTask.Callback, InputMethodRelativeLayout.onSizeChangedListenner {
private static final int A = 5;
private static final int B = 7;
public static final int f93753a = 101000;
protected static final int f93754b = 3;
public static final String f31762b = "bid";
protected static final int f93755c = 700;
public static final String f31764c = "pid";
public static final String d = "cid";
private static final int p = 0;
private static final int q = 2;
private static final int r = 3;
private static final int s = 4;
private static final int t = 5;
private static final int v = 0;
private static final int w = 1;
private static final int x = 2;
private static final int y = 3;
private static final int z = 4;
protected long f31767a;
protected Drawable f31769a;
public Uri f31770a;
protected View f31773a;
public Button f31774a;
private CheckBox f31775a;
public EditText f31776a;
protected FrameLayout f31777a;
protected GridView f31778a;
public ImageButton f31779a;
protected ImageView f31780a;
protected LinearLayout f31781a;
private PlusPanelAdapter f31782a;
public CommonRecordSoundPanel f31783a;
protected SystemEmoticonPanel f31784a;
protected TroopBarPublishUtils.PreUploadTask f31785a;
public AudioUploadTask f31786a;
public AudioInfo f31787a;
public TroopBarPOI f31788a;
public PublishItemContainer f31789a;
protected InputMethodRelativeLayout f31790a;
public QQProgressDialog f31791a;
protected ActionSheet f31792a;
protected CharSequence f31794a;
public boolean f31796a;
public ImageButton f31799b;
private AudioInfo f31800b;
protected QQProgressDialog f31801b;
protected ArrayList f31802b;
public boolean f31803b;
protected int f31807e;
protected String f31808e;
protected int f;
protected String f31810f;
protected boolean f31811f;
protected int g;
protected String f31812g;
protected boolean f31813g;
protected int h;
protected int i;
protected String f31816i;
protected boolean f31817i;
protected String f31818j;
protected boolean f31819j;
protected int k;
protected String f31820k;
protected int l;
protected String f31822l;
private boolean f31823l;
protected int m;
protected String f31824m;
protected int n;
protected String f31825n;
protected String f31826o;
public String f31827p;
public String f31828q;
public String f31829r;
private int u;
public static final String f31760a = TroopBarReplyActivity.class.getName();
private static int[] f31761a = {R.string.f58700name_res_0x7f0a0126, R.drawable.f41704name_res_0x7f020273, R.string.f61137name_res_0x7f0a0aae};
private static final int[] f31763b = {R.string.f63756name_res_0x7f0a14eb, R.drawable.f41690name_res_0x7f020265, R.string.f61138name_res_0x7f0a0aaf};
private static final int[] f31765c = {R.string.f61143name_res_0x7f0a0ab4, R.drawable.f41705name_res_0x7f020274, R.string.f61139name_res_0x7f0a0ab0};
private static final int[] f31766d = {R.string.f64223name_res_0x7f0a16be, R.drawable.f41698name_res_0x7f02026d, R.string.f61140name_res_0x7f0a0ab1};
private static final int[] e = {R.string.f61146name_res_0x7f0a0ab7, R.drawable.f41688name_res_0x7f020263, R.string.f61141name_res_0x7f0a0ab2};
private final int[][] f31797a = new int[5];
protected String f31814h = TroopBarUtils.f32483m;
public ArrayList f31795a = new ArrayList();
protected boolean f31804c = true;
protected int f31805d = 9;
protected boolean f31806d = true;
protected boolean f31809e = true;
protected int j = 0;
protected String f31830s = "";
protected Boolean f31793a = false;
protected boolean f31815h = true;
public boolean f31821k = true;
protected BroadcastReceiver f31768a = new uul(this);
public Handler f31771a = new uum(this);
Handler f31798b = new uun(this);
View.OnClickListener f31772a = new uuc(this);
int o = 0;
@Override
public void requestWindowFeature(Intent intent) {
requestWindowFeature(1);
}
@Override
public boolean doOnCreate(Bundle bundle) {
this.mNeedStatusTrans = true;
this.mActNeedImmersive = false;
super.doOnCreate(bundle);
Bundle extras = getIntent().getExtras();
if (extras == null) {
QQToast.a(this, 2, getString(R.string.f60960name_res_0x7f0a09fd, new Object[]{990}), 0).b(getTitleBarHeight());
finish();
return false;
}
this.u = extras.getInt("requestCode", 0);
String string = extras.getString("options");
if (QLog.isColorLevel()) {
QLog.d("IphoneTitleBarActivity", 2, "publish option: " + string);
}
try {
JSONObject jSONObject = new JSONObject(string);
this.f31816i = jSONObject.optString(TroopBarPublishUtils.f31710C);
this.f31818j = jSONObject.optString(TroopBarPublishUtils.f31711D);
this.f31807e = jSONObject.optInt(TroopBarPublishUtils.f31733h, 3);
this.f = jSONObject.optInt(TroopBarPublishUtils.f31734i, 700);
this.f31820k = jSONObject.optString(TroopBarPublishUtils.f31732g, this.f31820k);
this.f31811f = jSONObject.optBoolean(TroopBarPublishUtils.f31738m);
this.f31806d = jSONObject.optBoolean(TroopBarPublishUtils.f31730e, true);
this.f31809e = jSONObject.optBoolean(TroopBarPublishUtils.f31731f, true);
this.f31823l = jSONObject.optBoolean(TroopBarPublishUtils.f31751z, false);
this.f31804c = jSONObject.optBoolean(TroopBarPublishUtils.f31736k, true);
this.g = jSONObject.optInt("flag");
this.h = jSONObject.optInt(TroopBarPublishUtils.f31743r) == 0 ? 60000 : jSONObject.optInt(TroopBarPublishUtils.f31743r) * 1000;
this.f31813g = jSONObject.optInt(TroopBarPublishUtils.f31744s, 0) != 0;
this.i = jSONObject.optInt(TroopBarPublishUtils.f31745t, 1);
this.f31824m = jSONObject.optString(TroopBarPublishUtils.f31746u);
this.j = jSONObject.optInt(TroopBarPublishUtils.f31747v, 0);
this.f31805d = jSONObject.optInt(TroopBarPublishUtils.f31737l, 9);
this.k = jSONObject.optInt(TroopBarPublishUtils.f31748w, 0);
this.f31825n = jSONObject.optString(TroopBarPublishUtils.f31749x, getString(R.string.f61155name_res_0x7f0a0ac0));
this.f31830s = getString(R.string.f60979name_res_0x7f0a0a10, new Object[]{Integer.valueOf(this.f)});
this.l = jSONObject.optInt(TroopBarPublishUtils.f31727b, 1);
this.f31826o = jSONObject.optString("groupUin", "");
this.f31815h = jSONObject.optBoolean(TroopBarPublishUtils.S, true);
this.f31817i = jSONObject.optBoolean(TroopBarPublishUtils.T, false);
this.f31819j = jSONObject.optBoolean(TroopBarPublishUtils.U, false);
this.f31821k = jSONObject.optBoolean(TroopBarPublishUtils.V, true);
if (this.f31819j) {
this.f31821k = false;
}
a(jSONObject);
if (this.j == 0) {
m8683a();
}
e();
return true;
} catch (Exception e2) {
QQToast.a(this, 2, getString(R.string.f60960name_res_0x7f0a09fd, new Object[]{999}), 0).b(getTitleBarHeight());
finish();
return false;
}
}
@Override
public void finish() {
super.finish();
if (this.f31776a != null) {
InputMethodUtil.b(this.f31776a);
}
overridePendingTransition(0, R.anim.f37540name_res_0x7f04000a);
String str = ((this.f31776a == null || this.f31776a.length() <= 0) && (this.f31795a == null || this.f31795a.size() <= 0)) ? "1" : "0";
if (this.f31821k) {
TroopBarUtils.a("reply_page", "un", this.f31829r, str, "", "");
}
}
@Override
public boolean isWrapContent() {
return false;
}
public void a() {
String str;
int i;
String str2;
if (this.u == 101000 || this.f31817i || this.f31819j) {
String replace = TroopBarUtils.a(this.f31776a).replace("\n", TroopBarUtils.y);
this.f31803b = true;
Intent intent = new Intent();
intent.putExtra("result", "\"" + replace + "\"");
setResult(-1, intent);
finish();
} else if (!this.f31796a) {
if (this.l == 2 && this.f31821k) {
TroopBarUtils.a(ReportController.u, "pub_reco", "Clk_reco", this.f31826o, "", "", "");
}
this.f31796a = true;
if (this.f31785a != null) {
this.f31785a.f31757a = true;
this.f31785a = null;
}
if (this.f31786a != null && this.f31786a.a() != 0) {
a(true);
return;
}
String a2 = TroopBarUtils.a(this.f31776a);
if (TextUtils.isEmpty(a2)) {
str = a2;
i = 0;
} else {
str = a2.trim();
i = str.length();
}
if (!this.f31811f || this.f31795a.isEmpty()) {
if (i == 0) {
QQToast.a(this, (int) R.string.f60981name_res_0x7f0a0a12, 0).b(getTitleBarHeight());
if (this.f31821k) {
TroopBarUtils.a("reply_page", "fail", this.f31829r, "2", "", "");
}
this.f31796a = false;
return;
} else if (i < this.f31807e) {
QQToast.a(this, getString(R.string.f60982name_res_0x7f0a0a13, new Object[]{Integer.valueOf(this.f31807e)}), 0).b(getTitleBarHeight());
if (this.f31821k) {
TroopBarUtils.a("reply_page", "fail", this.f31829r, "2", "", "");
}
this.f31796a = false;
return;
} else if (i > this.f) {
QQToast.a(this, getString(R.string.f60983name_res_0x7f0a0a14, new Object[]{Integer.valueOf(this.f)}), 0).b(getTitleBarHeight());
if (this.f31821k) {
TroopBarUtils.a("reply_page", "fail", this.f31829r, "4", "", "");
}
this.f31796a = false;
return;
}
}
if (!a(this.i, this.f31813g)) {
this.f31796a = false;
} else if (!HttpUtil.m930a((Context) this)) {
QQToast.a(this, (int) R.string.f63256name_res_0x7f0a12f7, 0).b(getTitleBarHeight());
if (this.f31821k) {
TroopBarUtils.a("reply_page", "fail", this.f31829r, "7", "", "");
}
this.f31796a = false;
} else {
a(true);
for (int i2 = 0; i2 < this.f31795a.size(); i2++) {
if (((TroopBarPublishActivity.Pic_list) TroopBarUtils.f32469a.get((String) this.f31795a.get(i2))) == null) {
this.f31796a = false;
a(this, 1, this.f31771a);
if (this.f31821k) {
TroopBarUtils.a("reply_page", "fail", this.f31829r, "10", "", "");
return;
}
return;
}
}
boolean isChecked = this.f31775a != null ? this.f31775a.isChecked() : false;
String a3 = TroopBarPublishUtils.a(str, this.f31795a, this.f31787a);
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("pid", this.f31808e);
jSONObject.put("bid", Long.parseLong(this.f31829r));
jSONObject.put("comment", a3);
if (isChecked) {
jSONObject.put("is_forward", 1);
}
if (this.f31788a != null) {
jSONObject.put("uid", this.f31788a.h);
jSONObject.put(JumpAction.cy, String.valueOf(this.f31788a.f32126b));
jSONObject.put(JumpAction.cx, String.valueOf(this.f31788a.f32125a));
}
jSONObject.put(TroopBarUtils.f32492v, this.f31812g);
jSONObject.put("version", "6.5.5.1834.tim");
this.f31774a.setEnabled(false);
NewIntent newIntent = new NewIntent(super.getApplicationContext(), ProtoServlet.class);
if (isChecked) {
TroopBarUtils.a(this.f31827p, "reply_page_new", "share_interest", this.f31829r, "", "", "");
}
if (this.l == 1) {
str2 = "MQUpdateSvc_com_qq_xiaoqu.web.comment";
} else {
str2 = TroopTopicMgr.f32670e;
}
newIntent.putExtra("cmd", str2);
WebSsoBody.WebSsoRequestBody webSsoRequestBody = new WebSsoBody.WebSsoRequestBody();
webSsoRequestBody.type.set(0);
webSsoRequestBody.data.set(jSONObject.toString());
newIntent.putExtra("data", webSsoRequestBody.toByteArray());
newIntent.setObserver(new uty(this));
this.app.startServlet(newIntent);
} catch (Exception e2) {
QQToast.a(this, 2, (int) R.string.f60959name_res_0x7f0a09fc, 0).b(getTitleBarHeight());
a(false);
this.f31796a = false;
}
}
}
}
protected void a(JSONObject jSONObject) {
this.f31769a = getResources().getDrawable(R.drawable.f45294name_res_0x7f02107e);
this.f31794a = BaseApplication.getContext().getResources().getText(R.string.f62900name_res_0x7f0a1191);
ImageUtil.a((String) null, 0);
if (this.j != 0) {
j();
}
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(TroopBarPublishUtils.f31713F);
intentFilter.addAction(TroopBarPublishUtils.f31717J);
intentFilter.addAction(TroopBarPublishUtils.f31715H);
registerReceiver(this.f31768a, intentFilter);
this.f31829r = jSONObject.optString("bid", "");
this.f31808e = jSONObject.optString("pid", "");
this.f31810f = jSONObject.optString(d, "");
if (TextUtils.isEmpty(this.f31810f)) {
this.f31824m = this.app.getCurrentAccountUin() + "-" + this.f31829r + "-" + this.f31808e;
} else {
this.f31824m = this.app.getCurrentAccountUin() + "-" + this.f31829r + "-" + this.f31808e + "-" + this.f31810f;
}
this.f31812g = jSONObject.optString(TroopBarUtils.f32492v);
this.f31827p = ReportController.q;
this.f31828q = "reply_page";
}
@Override
public void doOnNewIntent(Intent intent) {
ArrayList<String> stringArrayListExtra;
super.doOnNewIntent(intent);
if (intent != null && (stringArrayListExtra = intent.getStringArrayListExtra("PhotoConst.PHOTO_PATHS")) != null) {
a(this.f31771a, stringArrayListExtra);
if (this.f31785a != null) {
this.f31785a.f31757a = true;
}
this.f31785a = new TroopBarPublishUtils.PreUploadTask(this, this.f31795a, TroopBarUtils.f32483m);
ThreadManager.a(this.f31785a, 8, null, true);
}
}
@Override
public void doOnActivityResult(int i, int i2, Intent intent) {
super.doOnActivityResult(i, i2, intent);
this.f31779a.setSelected(false);
this.f31799b.setSelected(false);
if (i2 != 0) {
switch (i) {
case 1001:
if (this.f31770a != null) {
String c2 = com.tencent.mobileqq.utils.ImageUtil.c(this, this.f31770a);
com.tencent.mobileqq.utils.ImageUtil.m9202a((Context) this, c2);
a(this.f31771a, c2);
if (this.f31785a != null) {
this.f31785a.f31757a = true;
}
this.f31785a = new TroopBarPublishUtils.PreUploadTask(this, this.f31795a, TroopBarUtils.f32483m);
ThreadManager.a(this.f31785a, 8, null, true);
if (this.f31821k) {
TroopBarUtils.a("reply_page", "choose_place", this.f31829r, "2", "", "");
return;
}
return;
}
return;
case 1002:
this.f31788a = (TroopBarPOI) intent.getParcelableExtra("key_selected_poi");
if (this.f31788a == null) {
a(0, new String[0]);
return;
} else {
a(1, TextUtils.isEmpty(this.f31788a.j) ? this.f31788a.k : this.f31788a.j);
return;
}
case 1003:
AudioInfo audioInfo = (AudioInfo) intent.getSerializableExtra("audio_info");
a(2, audioInfo);
this.f31787a = audioInfo;
this.f31786a = new AudioUploadTask(this, this.f31771a, TroopBarUtils.f32484n, this.f31787a);
ThreadManager.a(this.f31786a, 5, null, true);
return;
default:
return;
}
}
}
@Override
public void doOnStop() {
super.doOnStop();
this.f31789a.c();
if (this.f31771a != null) {
this.f31771a.removeMessages(1001);
this.f31771a.removeMessages(1003);
}
}
@Override
public void doOnDestroy() {
super.doOnDestroy();
this.f31789a.c();
if (!this.f31803b) {
g();
}
if (this.f31776a != null) {
this.f31776a.removeTextChangedListener(this);
}
boolean m3117b = this.f31783a.m3117b();
if (QLog.isColorLevel()) {
QLog.d(LogTag.g, 2, "RecordSoundPanel.onDestroy() is called,isRecording is:" + m3117b);
}
unregisterReceiver(this.f31768a);
this.f31783a.mo3138c();
}
protected void e() {
try {
if (this.f31823l) {
setContentView(R.layout.f57051name_res_0x7f0302c2);
this.f31775a = (CheckBox) findViewById(R.id.f50802name_res_0x7f090e8e);
} else {
setContentView(R.layout.f57050name_res_0x7f0302c1);
}
View findViewById = findViewById(R.id.f48290rlCommenTitle);
if (findViewById != null) {
findViewById.setVisibility(8);
}
this.f31790a = (InputMethodRelativeLayout) findViewById(R.id.f48729name_res_0x7f090675);
this.f31779a = (ImageButton) findViewById(R.id.f50790name_res_0x7f090e82);
this.f31799b = (ImageButton) findViewById(R.id.f49857plus_btn);
this.f31780a = (ImageView) findViewById(R.id.f50776name_res_0x7f090e74);
this.f31776a = (EditText) findViewById(R.id.f50768name_res_0x7f090e6c);
this.f31774a = (Button) findViewById(R.id.f49812send_btn);
this.f31789a = (PublishItemContainer) findViewById(R.id.f50800name_res_0x7f090e8c);
this.f31789a.setMaxPicNum(9);
this.f31773a = findViewById(R.id.f50801name_res_0x7f090e8d);
this.f31777a = (FrameLayout) findViewById(R.id.f50764name_res_0x7f090e68);
this.f31784a = TroopBarPublishUtils.a(this, this.f31777a, this.f31776a, this);
this.f31790a.setOnSizeChangedListenner(this);
findViewById(R.id.f50765name_res_0x7f090e69).setOnClickListener(this);
this.f31778a = (GridView) findViewById(R.id.f50798name_res_0x7f090e8a);
this.f31778a.setVisibility(8);
this.f31782a = new PlusPanelAdapter();
this.f31782a.a(this.f31772a);
this.f31778a.setAdapter((ListAdapter) this.f31782a);
a((Context) this);
this.f31781a = (LinearLayout) findViewById(R.id.f50762name_res_0x7f090e66);
this.f31783a = (CommonRecordSoundPanel) LayoutInflater.from(this).inflate(R.layout.f57012name_res_0x7f03029b, (ViewGroup) null);
this.f31783a.a(this.app, this, this.f31798b, 1);
this.f31783a.d();
this.f31783a.setTimeOutTime(this.h);
this.f31781a.addView(this.f31783a);
this.f31779a.setOnClickListener(this);
this.f31780a.setOnClickListener(this);
this.f31799b.setOnClickListener(this);
this.f31774a.setSelected(true);
this.f31774a.setPressed(false);
this.f31774a.setOnClickListener(this);
this.f31776a.addTextChangedListener(this);
if (TextUtils.isEmpty(this.f31820k) || this.f31807e <= 0 || this.f <= 0) {
this.f31807e = 3;
this.f = 700;
this.f31820k = getString(R.string.f60967name_res_0x7f0a0a04, new Object[]{Integer.valueOf(this.f31807e), Integer.valueOf(this.f)});
}
this.f31776a.setHint(this.f31820k);
if (this.f31776a.getText().length() <= 0) {
this.f31776a.setText(!TextUtils.isEmpty(this.f31822l) ? this.f31822l : null);
}
if (this.f31788a != null) {
a(1, TextUtils.isEmpty(this.f31788a.j) ? this.f31788a.k : this.f31788a.j);
} else {
a(0, new String[0]);
}
a(this, this);
this.f31780a.setVisibility(this.f31806d ? 0 : 8);
this.f31779a.setVisibility(this.f31809e ? 0 : 8);
if (this.f31795a.size() > 0) {
a(this.f31771a, this.f31795a);
} else if (this.f31787a != null) {
a(2, this.f31787a);
}
if (!this.f31815h) {
this.f31799b.setVisibility(8);
}
StringBuffer stringBuffer = new StringBuffer();
if ((this.i & 1) == 1) {
stringBuffer.append("0");
}
if ((this.i & 2) == 2) {
stringBuffer.append("1");
}
if (this.f31821k) {
TroopBarUtils.a("reply_page", "choose_place", this.f31829r, "0", stringBuffer.toString(), "");
TroopBarUtils.a("reply_page", "exp", String.valueOf(this.f31829r), "", "", "");
}
} catch (OutOfMemoryError e2) {
e2.printStackTrace();
finish();
}
}
@Override
public void afterTextChanged(Editable editable) {
int i = 0;
this.m = this.f31776a.getSelectionStart();
this.n = this.f31776a.getSelectionEnd();
String a2 = TroopBarUtils.a(this.f31776a);
int length = a2 == null ? 0 : a2.length();
if (this.f > 0 && length > this.f) {
int i2 = length - this.f;
editable.delete(this.m - i2, this.n);
this.m -= i2;
this.n -= i2;
if (this.f31793a.booleanValue()) {
i = i2;
} else {
QQToast.a(this, this.f31830s, 0).b(getTitleBarHeight());
this.f31793a = true;
i = i2;
}
} else {
this.f31793a = false;
}
this.f31776a.setSelection(i + this.m);
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
protected void f() {
this.f31771a.postDelayed(new uug(this), 200L);
this.f31771a.postDelayed(new uuh(this), 500L);
}
public void a(int i, MediaInfo mediaInfo) {
if (mediaInfo != null) {
if (mediaInfo instanceof AudioInfo) {
this.f31787a = (AudioInfo) mediaInfo;
}
this.f31795a.clear();
this.f31789a.a(i, mediaInfo);
d(0);
InputMethodUtil.a(this.f31776a);
}
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.f49812send_btn:
this.f31789a.c();
a();
return;
case R.id.f49857plus_btn:
if (this.f31778a.getVisibility() == 0) {
d(0);
this.f31771a.postDelayed(new uuj(this), 200L);
return;
}
InputMethodUtil.b(this.f31776a);
this.f31771a.postDelayed(new uuk(this), 200L);
if (this.f31821k) {
TroopBarUtils.a(this.f31827p, this.f31828q, "Clk_add", this.f31829r, "", "", "");
return;
}
return;
case R.id.f50765name_res_0x7f090e69:
if (QLog.isColorLevel()) {
QLog.w("IphoneTitleBarActivity", 2, "transparent_space click!!!!!!!!!!!!!!!");
}
this.f31789a.c();
finish();
return;
case R.id.f50776name_res_0x7f090e74:
Intent intent = new Intent(this, TroopBarPublishLocationSelectActivity.class);
intent.putParcelableArrayListExtra("current_location_list", this.f31802b);
intent.putExtra("key_selected_poi", this.f31788a);
startActivityForResult(intent, 1002);
if (this.f31821k) {
TroopBarUtils.a("reply_page", "Clk_place", this.f31829r, this.f31788a != null ? "0" : "1", "", "");
return;
}
return;
case R.id.f50790name_res_0x7f090e82:
if (System.currentTimeMillis() - this.f31767a >= 500) {
this.f31767a = System.currentTimeMillis();
if (this.f31784a.getVisibility() == 0) {
this.f31784a.setVisibility(8);
InputMethodUtil.a(this.f31776a);
this.f31779a.setSelected(false);
this.f31799b.setSelected(false);
return;
}
InputMethodUtil.b(this.f31776a);
this.f31771a.postDelayed(new uui(this), 200L);
return;
}
return;
case R.id.f50795name_res_0x7f090e87:
if (this.f31821k) {
TroopBarUtils.a("pub_page", "choose_photo", this.f31829r, "", "", "");
return;
}
return;
case R.id.f50797name_res_0x7f090e89:
if (this.f31821k) {
TroopBarUtils.a("reply_page", "del_photo", this.f31829r, "", "", "");
return;
}
return;
default:
return;
}
}
protected void a(int i, String... strArr) {
String str;
boolean z2 = false;
String str2 = "";
switch (i) {
case 0:
str = getString(R.string.f62719name_res_0x7f0a10dc);
break;
case 1:
if (strArr != null && strArr.length > 0 && !TextUtils.isEmpty(strArr[0])) {
if (TextUtils.isEmpty(strArr[0])) {
a(3, new String[0]);
return;
}
str = strArr[0];
z2 = true;
break;
} else {
a(0, new String[0]);
return;
}
break;
case 2:
str = getString(R.string.f62717name_res_0x7f0a10da);
break;
case 3:
str2 = getString(R.string.f62718name_res_0x7f0a10db);
if (strArr != null && strArr.length > 0) {
QQToast.a(this, strArr[0], 1).b(getTitleBarHeight());
str = str2;
break;
}
break;
default:
str = str2;
break;
}
this.f31780a.setSelected(z2);
if (!z2) {
str = getString(R.string.f60997name_res_0x7f0a0a22);
}
this.f31780a.setContentDescription(str);
}
@Override
public void a(JSONObject jSONObject, int i, Bundle bundle) {
if (!isFinishing()) {
switch (i) {
case 3:
if (jSONObject != null) {
try {
JSONArray jSONArray = jSONObject.getJSONArray("poilist");
if (this.f31802b == null) {
this.f31802b = new ArrayList();
} else {
this.f31802b.clear();
}
for (int i2 = 0; i2 < jSONArray.length(); i2++) {
this.f31802b.add(new TroopBarPOI(jSONArray.getJSONObject(i2)));
}
if (this.f31802b.size() > 0) {
this.f31788a = (TroopBarPOI) this.f31802b.get(0);
}
} catch (JSONException e2) {
if (QLog.isColorLevel()) {
QLog.d(TroopBarUtils.f32466a, 2, e2.toString());
}
}
if (this.f31788a == null) {
a(0, new String[0]);
return;
} else {
a(1, TextUtils.isEmpty(this.f31788a.j) ? this.f31788a.k : this.f31788a.j);
return;
}
}
a(3, new String[0]);
return;
default:
return;
}
}
}
protected void g() {
if (QLog.isColorLevel()) {
QLog.d(TroopBarUtils.f32466a, 2, "reply save key = " + this.f31824m);
}
if (!TextUtils.isEmpty(this.f31824m)) {
TroopBarUtils.PublishDataCacheEntity publishDataCacheEntity = new TroopBarUtils.PublishDataCacheEntity();
if (this.f31795a != null) {
ArrayList arrayList = new ArrayList();
for (int i = 0; i < this.f31795a.size(); i++) {
arrayList.add(this.f31795a.get(i));
}
publishDataCacheEntity.f32497a = arrayList;
}
if (this.f31788a != null) {
publishDataCacheEntity.f32495a = new TroopBarPOI(this.f31788a);
if (this.f31802b != null) {
ArrayList arrayList2 = new ArrayList();
for (int i2 = 0; i2 < this.f31802b.size(); i2++) {
arrayList2.add(new TroopBarPOI((TroopBarPOI) this.f31802b.get(i2)));
}
publishDataCacheEntity.f32499b = arrayList2;
}
}
publishDataCacheEntity.f94044c = this.f31807e;
publishDataCacheEntity.d = this.f;
publishDataCacheEntity.f32498b = this.f31820k;
publishDataCacheEntity.f32501d = this.f31776a.getEditableText().toString();
if (this.f31787a != null) {
try {
publishDataCacheEntity.f32494a = (AudioInfo) this.f31787a.clone();
} catch (CloneNotSupportedException e2) {
if (QLog.isColorLevel()) {
QLog.e("IphoneTitleBarActivity", 2, QLog.getStackTraceString(e2));
}
}
}
TroopBarUtils.f32471b.put(this.f31824m, publishDataCacheEntity);
if (QLog.isColorLevel()) {
QLog.d(TroopBarUtils.f32466a, 2, "reply save key = " + this.f31824m + ", data = " + publishDataCacheEntity);
}
}
}
protected boolean m8683a() {
if (QLog.isColorLevel()) {
QLog.d(TroopBarUtils.f32466a, 2, "repky restore key = " + this.f31824m);
}
if (TextUtils.isEmpty(this.f31824m)) {
return false;
}
TroopBarUtils.PublishDataCacheEntity publishDataCacheEntity = (TroopBarUtils.PublishDataCacheEntity) TroopBarUtils.f32471b.get(this.f31824m);
if (QLog.isColorLevel()) {
QLog.d(TroopBarUtils.f32466a, 2, "reply restore key = " + this.f31824m + ", replyData = " + publishDataCacheEntity);
}
TroopBarUtils.f32471b.clear();
if (publishDataCacheEntity == null) {
return false;
}
if (this.f31795a.size() <= 0) {
this.f31795a = publishDataCacheEntity.f32497a;
}
this.f31788a = publishDataCacheEntity.f32495a;
this.f31802b = publishDataCacheEntity.f32499b;
this.f31807e = publishDataCacheEntity.f94044c;
this.f = publishDataCacheEntity.d;
this.f31820k = publishDataCacheEntity.f32498b;
this.f31822l = publishDataCacheEntity.f32501d;
this.f31787a = publishDataCacheEntity.f32494a;
return true;
}
protected void a(View view, String str, int i) {
if (view != null && !TextUtils.isEmpty(str)) {
View findViewById = view.findViewById(R.id.f50797name_res_0x7f090e89);
URLImageView uRLImageView = (URLImageView) view.findViewById(R.id.f50795name_res_0x7f090e87);
uRLImageView.setAdjustViewBounds(false);
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) uRLImageView.getLayoutParams();
layoutParams.width = 100;
layoutParams.height = 100;
layoutParams.addRule(9);
layoutParams.addRule(15);
RelativeLayout.LayoutParams layoutParams2 = (RelativeLayout.LayoutParams) findViewById.getLayoutParams();
layoutParams2.topMargin = DisplayUtil.a(this, 2.0f);
layoutParams2.rightMargin = DisplayUtil.a(this, 2.0f);
File file = new File(str);
Drawable drawable = null;
try {
drawable = file.exists() ? URLDrawable.getDrawable(file.toURL(), this.f31769a, this.f31769a) : this.f31769a;
} catch (MalformedURLException e2) {
}
if (drawable == null) {
drawable = this.f31769a;
}
drawable.setBounds(0, 0, 100, 100);
uRLImageView.setImageDrawable(drawable);
uRLImageView.setContentDescription(this.f31794a);
findViewById.setTag(str);
findViewById.setOnClickListener(this);
uRLImageView.setTag(str);
uRLImageView.setOnClickListener(this);
LinearLayout.LayoutParams layoutParams3 = (LinearLayout.LayoutParams) view.getLayoutParams();
layoutParams3.rightMargin = DisplayUtil.a(this, 2.0f);
layoutParams3.width = DisplayUtil.a(this, 10.0f) + 100;
layoutParams3.height = DisplayUtil.a(this, 17.0f) + 100;
}
}
@Override
public void a(boolean z2, int i, int i2) {
if (z2) {
d(0);
this.f31779a.setSelected(false);
this.f31799b.setSelected(false);
}
}
private void a(Context context) {
int i;
ArrayList arrayList = new ArrayList();
Resources resources = context.getResources();
this.f31799b.setVisibility(8);
if ((this.i & 1) == 1) {
this.f31797a[0] = f31761a;
this.f31797a[1] = f31763b;
i = 2;
} else {
i = 0;
}
if ((this.i & 2) == 2) {
this.f31797a[i] = f31765c;
i++;
}
if ((this.i & 8) == 8) {
this.f31797a[i] = e;
i++;
}
if ((this.i & 4) == 4) {
this.f31797a[i] = f31766d;
i++;
}
if (i > 0) {
this.f31799b.setVisibility(0);
for (int i2 = 0; i2 < this.f31797a.length; i2++) {
int[] iArr = this.f31797a[i2];
if (iArr != null && iArr.length == f31761a.length) {
PlusPanel.PluginData pluginData = new PlusPanel.PluginData();
pluginData.f12433a = resources.getDrawable(iArr[1]);
pluginData.f85616a = iArr[1];
pluginData.f12434a = resources.getString(iArr[0]);
pluginData.f12436b = resources.getString(iArr[2]);
pluginData.f12435a = false;
arrayList.add(pluginData);
}
}
this.f31782a.a(arrayList);
this.f31782a.notifyDataSetChanged();
}
}
public void d(int i) {
this.f31777a.setBackgroundResource(R.drawable.f41145name_res_0x7f020043);
switch (i) {
case 2:
InputMethodUtil.b(this.f31776a);
this.f31778a.setVisibility(8);
this.f31784a.setVisibility(0);
this.f31781a.setVisibility(8);
return;
case 3:
InputMethodUtil.b(this.f31776a);
this.f31778a.setVisibility(0);
this.f31784a.setVisibility(8);
this.f31781a.setVisibility(8);
return;
case 4:
InputMethodUtil.b(this.f31776a);
this.f31783a.setVisibility(0);
this.f31783a.d();
this.f31781a.setVisibility(0);
this.f31778a.setVisibility(8);
this.f31784a.setVisibility(8);
return;
default:
this.f31777a.setBackgroundColor(0);
this.f31778a.setVisibility(8);
this.f31784a.setVisibility(8);
this.f31781a.setVisibility(8);
return;
}
}
public void b(boolean z2) {
AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.4f);
alphaAnimation.setDuration(0L);
alphaAnimation.setFillAfter(true);
AlphaAnimation alphaAnimation2 = new AlphaAnimation(0.4f, 1.0f);
alphaAnimation2.setDuration(0L);
alphaAnimation2.setFillAfter(true);
this.f31779a.setEnabled(z2);
this.f31799b.setEnabled(z2);
this.f31774a.setEnabled(z2);
this.f31780a.setEnabled(z2);
findViewById(R.id.f50765name_res_0x7f090e69).setEnabled(z2);
this.f31776a.setEnabled(z2);
if (z2) {
this.f31779a.startAnimation(alphaAnimation2);
this.f31799b.startAnimation(alphaAnimation2);
this.f31774a.startAnimation(alphaAnimation2);
this.f31776a.startAnimation(alphaAnimation2);
this.f31780a.startAnimation(alphaAnimation2);
findViewById(R.id.f50765name_res_0x7f090e69).setBackgroundColor(0);
findViewById(R.id.f50765name_res_0x7f090e69).setBackgroundResource(R.drawable.f47067name_res_0x7f02176b);
return;
}
this.f31779a.startAnimation(alphaAnimation);
this.f31799b.startAnimation(alphaAnimation);
this.f31776a.startAnimation(alphaAnimation);
this.f31780a.startAnimation(alphaAnimation);
findViewById(R.id.f50765name_res_0x7f090e69).setBackgroundColor(1291845632);
this.f31774a.startAnimation(alphaAnimation);
}
public void a(int i) {
String string;
QQCustomDialog m9154a = DialogUtil.m9154a((Context) this, 230);
m9154a.setTitle(R.string.f61148name_res_0x7f0a0ab9);
utz utzVar = new utz(this, i);
m9154a.setNegativeButton(getString(R.string.f61150name_res_0x7f0a0abb), utzVar);
switch (i) {
case 0:
string = getString(R.string.f61142name_res_0x7f0a0ab3, new Object[]{getString(R.string.f61145name_res_0x7f0a0ab6)});
m9154a.setPositiveButton(getString(R.string.f61153name_res_0x7f0a0abe), utzVar);
break;
case 1:
string = getString(R.string.f61142name_res_0x7f0a0ab3, new Object[]{getString(R.string.f61145name_res_0x7f0a0ab6)});
m9154a.setPositiveButton(getString(R.string.f61153name_res_0x7f0a0abe), utzVar);
break;
case 2:
string = getString(R.string.f61142name_res_0x7f0a0ab3, new Object[]{getString(R.string.f61143name_res_0x7f0a0ab4)});
m9154a.setMessage(string);
m9154a.setPositiveButton(getString(R.string.f61152name_res_0x7f0a0abd), utzVar);
break;
case 3:
string = getString(R.string.f61142name_res_0x7f0a0ab3, new Object[]{getString(R.string.f61144name_res_0x7f0a0ab5)});
m9154a.setPositiveButton(getString(R.string.f61151name_res_0x7f0a0abc), utzVar);
break;
case 4:
String string2 = getString(R.string.f61007name_res_0x7f0a0a2c, new Object[]{9});
this.f31789a.a(this.f31795a.size() < 9);
string = string2;
break;
case 5:
string = getString(R.string.f61147name_res_0x7f0a0ab8);
m9154a.setPositiveButton(getString(R.string.f61149name_res_0x7f0a0aba), utzVar);
break;
case 6:
default:
return;
case 7:
string = getString(R.string.f61142name_res_0x7f0a0ab3, new Object[]{getString(R.string.f61146name_res_0x7f0a0ab7)});
m9154a.setPositiveButton(getString(R.string.f61154name_res_0x7f0a0abf), utzVar);
break;
}
m9154a.setMessage(string);
m9154a.show();
}
public void b(int i) {
Bundle bundle = new Bundle();
bundle.putString("bid", this.f31829r);
bundle.putString("pid", this.f31808e);
bundle.putString("from", "qqbuluo");
bundle.putString("uin", this.app.getCurrentAccountUin());
bundle.putString("content", TroopBarUtils.a(this.f31776a).trim());
bundle.putString("clicktype", i == 3 ? "video" : "music");
try {
bundle.putString("floor", new JSONObject(this.f31812g).getString("floor"));
} catch (Exception e2) {
}
TroopBarPublishUtils.a(this, 2, i, bundle);
}
public void h() {
if (this.f31795a.size() >= 9) {
a(4);
} else {
TroopBarPublishUtils.a(this, this.f31795a, this.f31805d);
}
}
public void i() {
if (this.f31795a.size() >= 9) {
a(4);
} else {
this.f31770a = TroopBarPublishUtils.a((BaseActivity) this);
}
}
@Override
public void doOnBackPressed() {
super.doOnBackPressed();
boolean m3117b = this.f31783a.m3117b();
if (QLog.isColorLevel()) {
QLog.d(LogTag.g, 2, "RecordSoundPanel.onBackEvent() is called,isRecording is:" + m3117b);
}
this.f31783a.mo3115a();
this.f31789a.c();
}
@Override
public void doOnPause() {
super.doOnPause();
boolean m3117b = this.f31783a.m3117b();
if (QLog.isColorLevel()) {
QLog.d(LogTag.g, 2, "RecordSoundPanel.onPause() is called,isRecording is:" + m3117b);
}
this.f31783a.b();
this.f31789a.c();
}
protected void a(BaseActivity baseActivity, int i, Handler handler) {
baseActivity.runOnUiThread(new uud(this));
if (((TicketManager) baseActivity.app.getManager(2)).getSkey(baseActivity.app.getCurrentAccountUin()) != null) {
switch (i) {
case 1:
ThreadManager.a(new TroopBarPublishUtils.PicUploadThread(baseActivity, handler, this.f31795a, this.f31814h), 8, null, true);
return;
default:
return;
}
} else if (QLog.isColorLevel()) {
QLog.w("IphoneTitleBarActivity", 2, "startUploadImage skey is null!!!!!!!!!!!!!!!");
}
}
public void a(boolean z2) {
if (z2) {
if (this.f31791a == null) {
this.f31791a = new QQProgressDialog(this, getTitleBarHeight());
}
this.f31791a.b(R.string.f61008name_res_0x7f0a0a2d);
this.f31791a.show();
} else if (this.f31791a != null && this.f31791a.isShowing()) {
this.f31791a.dismiss();
}
}
@Override
public void b() {
if (this.f31776a != null) {
com.tencent.mobileqq.text.TextUtils.a(this.f31776a);
}
}
@Override
public void a(EmoticonInfo emoticonInfo) {
if ((emoticonInfo instanceof SystemAndEmojiEmoticonInfo) && this.f31776a != null) {
((SystemAndEmojiEmoticonInfo) emoticonInfo).a(this.app, this, this.f31776a, null);
}
}
@Override
public void c() {
}
@Override
public boolean mo2340a(EmoticonInfo emoticonInfo) {
return true;
}
@Override
public void a(EmoticonInfo emoticonInfo, EmoticonInfo emoticonInfo2, Drawable drawable) {
}
@Override
public void b(EmoticonInfo emoticonInfo) {
}
@Override
public void setting() {
}
@Override
public void d() {
}
protected void a(BaseActivity baseActivity, String str) {
if (this.f31792a == null || !this.f31792a.isShowing()) {
ActionSheet a2 = ActionSheet.a(baseActivity);
a2.a(R.string.f65013name_res_0x7f0a19d9, 1);
a2.a(R.string.f65015name_res_0x7f0a19db, 1);
a2.d(R.string.f63203cancel);
a2.a(new uue(this, baseActivity, a2));
a2.show();
this.f31792a = a2;
}
}
protected boolean a(int i, boolean z2) {
if (z2) {
String str = null;
if ((i & 1) == 1 && this.f31795a.size() == 0) {
str = getString(R.string.f61160name_res_0x7f0a0ac5, new Object[]{getString(R.string.f61145name_res_0x7f0a0ab6)});
} else if ((i & 2) == 2 && this.f31787a == null) {
str = getString(R.string.f61160name_res_0x7f0a0ac5, new Object[]{getString(R.string.f61143name_res_0x7f0a0ab4)});
}
if (str != null) {
QQToast.a(this, str, 0).b(getTitleBarHeight());
return false;
}
return true;
}
return true;
}
protected void a(BaseActivity baseActivity, HttpWebCgiAsyncTask.Callback callback) {
SosoInterface.a(new uuf(this, 0, true, true, this.o, false, false, "AbsPublish", baseActivity, callback));
a(2, new String[0]);
}
public boolean m8684a(int i) {
String str = null;
if ((this.k & i) == i) {
switch (i) {
case 1:
str = getString(R.string.f61157name_res_0x7f0a0ac2, new Object[]{this.f31825n});
break;
case 2:
str = getString(R.string.f61156name_res_0x7f0a0ac1, new Object[]{this.f31825n});
break;
}
if (str != null) {
QQToast.a(this, str, 0).b(getTitleBarHeight());
return true;
}
}
return false;
}
protected void j() {
switch (this.j) {
case 1:
if ((this.i & 1) == 1) {
i();
return;
}
return;
case 2:
if ((this.i & 1) == 1) {
h();
return;
}
return;
case 3:
if ((this.i & 2) == 2) {
f();
return;
}
return;
default:
return;
}
}
protected boolean a(Handler handler, ArrayList arrayList) {
if (arrayList != null && arrayList.size() > 9) {
QQToast.a(this, getString(R.string.f62619name_res_0x7f0a1078, new Object[]{9}), 1).b(getTitleBarHeight());
return false;
}
if (arrayList != this.f31795a) {
this.f31795a.clear();
if (arrayList != null) {
this.f31795a.addAll(arrayList);
}
} else {
this.f31795a = arrayList;
}
handler.sendMessage(handler.obtainMessage(1005));
return true;
}
protected boolean a(Handler handler, String str) {
if (TextUtils.isEmpty(str)) {
QQToast.a(this, getString(R.string.f61158name_res_0x7f0a0ac3), 1).b(getTitleBarHeight());
return false;
} else if (this.f31795a != null) {
if (this.f31795a.size() >= 9) {
QQToast.a(this, getString(R.string.f62619name_res_0x7f0a1078, new Object[]{9}), 1).b(getTitleBarHeight());
return false;
}
this.f31795a.add(str);
Message obtainMessage = handler.obtainMessage(1005);
obtainMessage.obj = str;
handler.sendMessage(obtainMessage);
return true;
} else {
return false;
}
}
public void c(int i) {
if (this.f31801b == null) {
this.f31801b = new QQProgressDialog(this, getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
}
this.f31801b.b(i);
this.f31801b.setCancelable(false);
this.f31801b.show();
}
public void k() {
if (this.f31801b != null && this.f31801b.isShowing()) {
this.f31801b.dismiss();
}
}
public class AudioUploadTask implements Runnable {
protected int f93756a;
protected Handler f31831a;
protected AudioInfo f31833a;
protected String f31834a;
protected WeakReference f31835a;
protected boolean f31836a;
public AudioUploadTask(BaseActivity baseActivity, Handler handler, String str, AudioInfo audioInfo) {
this.f31834a = str;
this.f31835a = new WeakReference(baseActivity);
this.f31831a = handler;
if (audioInfo != null) {
this.f31833a = new AudioInfo(audioInfo);
}
this.f93756a = -1;
}
@Override
public void run() {
JSONObject optJSONObject;
this.f93756a = 1;
BaseActivity baseActivity = this.f31835a == null ? null : (BaseActivity) this.f31835a.get();
if (baseActivity == null) {
if (QLog.isColorLevel()) {
QLog.d("IphoneTitleBarActivity", 2, "PreUploadTask activity is null!");
}
this.f93756a = 0;
} else if (this.f31833a == null || !FileUtil.m6632b(this.f31833a.path)) {
if (QLog.isColorLevel()) {
QLog.d("IphoneTitleBarActivity", 2, "Audio is null!");
}
this.f93756a = 0;
} else {
AppRuntime appRuntime = baseActivity.getAppRuntime();
String account = appRuntime.getAccount();
String skey = ((TicketManager) appRuntime.getManager(2)).getSkey(account);
if (TextUtils.isEmpty(skey)) {
this.f93756a = 0;
return;
}
HashMap hashMap = new HashMap();
hashMap.put("type", "1");
hashMap.put("name", this.f31833a.path);
hashMap.put(xvz.ai, this.f31833a.path);
HashMap hashMap2 = new HashMap();
hashMap2.put("file", this.f31833a.path);
HashMap hashMap3 = new HashMap();
hashMap3.put("Connection", "keep-alive");
hashMap3.put("Referer", "http://www.qq.com");
String a2 = HttpUtil.a(this.f31834a, account, skey, hashMap, hashMap2, hashMap3);
if (a2 != null) {
try {
JSONObject jSONObject = new JSONObject(a2);
if (jSONObject.optInt(HttpWebCgiAsyncTask.f94008b, -1) == 0 && (optJSONObject = jSONObject.optJSONObject("result")) != null && optJSONObject.optInt(HttpWebCgiAsyncTask.f94008b) == 0) {
if (TroopBarReplyActivity.this.f31787a != null) {
TroopBarReplyActivity.this.f31787a.url = optJSONObject.optString("url");
}
this.f31831a.sendMessage(this.f31831a.obtainMessage(1009));
}
} catch (JSONException e) {
if (QLog.isColorLevel()) {
QLog.d("IphoneTitleBarActivity", 2, e.getMessage());
}
}
} else {
this.f31831a.sendMessage(this.f31831a.obtainMessage(1004));
if (QLog.isColorLevel()) {
QLog.d("IphoneTitleBarActivity", 2, "scalePublishImage failed: path = " + this.f31833a.path);
}
}
this.f93756a = 0;
}
}
public int a() {
return this.f93756a;
}
}
}