TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 QZoneVideoDownloadActivity.java 源代码,内容仅作参考
package cooperation.qzone;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.tencent.av.camera.QavCameraUsage;
import com.tencent.biz.qqstory.takevideo.EditVideoActivity;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.image.URLImageView;
import com.tencent.mobileqq.activity.photo.LocalMediaInfo;
import com.tencent.mobileqq.activity.richmedia.FlowCameraConstant;
import com.tencent.mobileqq.activity.richmedia.FlowComponentInterface;
import com.tencent.mobileqq.activity.shortvideo.PreviewVideoActivity;
import com.tencent.mobileqq.app.IphoneTitleBarActivity;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.earlydownload.EarlyDownloadManager;
import com.tencent.mobileqq.earlydownload.handler.QQShortVideoHandler;
import com.tencent.mobileqq.pluginsdk.PluginManagerClient;
import com.tencent.mobileqq.pluginsdk.PluginStatic;
import com.tencent.mobileqq.shortvideo.ShortVideoConstants;
import com.tencent.mobileqq.shortvideo.VideoEnvironment;
import com.tencent.mobileqq.shortvideo.util.PtvFilterSoLoad;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.video.decode.ShortVideoSoLoad;
import cooperation.peak.PeakConstants;
import cooperation.plugin.PluginInfo;
import cooperation.qzone.QZoneHelper;
import cooperation.qzone.report.lp.LpReportInfo_pf00064;
import cooperation.qzone.video.QzoneVideoBeaconReport;
import cooperation.qzone.video.VideoComponentCallback;
import cooperation.qzone.video.interact.RecordSVInteractActivity;
import java.io.File;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
import mqq.app.AppRuntime;
public class QZoneVideoDownloadActivity extends IphoneTitleBarActivity {
public static final String f98416a = "QZoneVideoDownloadActivity";
public static final int f98417b = 1003;
public static final String f70253b = "support_pic";
public static final int f98418c = 1002;
public static final String f70254c = "http://qzs.qq.com/qzone/photo/v7/js/common/images/mini_video_cover_7.png";
public static final int d = 1000;
public static final int e = 1001;
public static final int f = 1004;
public int f70255a;
public long f70256a;
private Bundle f70257a;
public ProgressBar f70259a;
public TextView f70260a;
public URLImageView f70261a;
private LocalMediaInfo f70262a;
public PluginManagerClient f70263a;
public boolean f70265a;
private long f70266b;
public boolean f70268b;
private long f70269c;
public boolean f70270c;
public String f70271d;
public boolean f70272d;
public String f70273e;
public boolean f70274e;
private String f70275f;
public boolean f70276f;
private int g;
private String f70277g;
public boolean f70278g;
private int h;
private String f70279h;
private boolean f70280h;
private int i;
private String f70281i;
private boolean f70282i;
private String j;
private boolean f70283j;
private String k;
private boolean f70284k;
private String l;
private boolean f70285l;
private boolean m;
private boolean n;
private boolean o;
private boolean p;
private AtomicBoolean f70264a = new AtomicBoolean(false);
public Handler f70258a = new xzt(this);
private AtomicBoolean f70267b = new AtomicBoolean(false);
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
getWindow().getDecorView().setBackgroundColor(-16777216);
Intent intent = getIntent();
if (intent == null) {
Toast.makeText(getApplicationContext(), "参数错误,无法启动", 1).show();
QzoneVideoBeaconReport.a(null, QzoneVideoBeaconReport.h, "1002", null);
return;
}
this.f70265a = intent.getBooleanExtra("support_record", false);
this.f70268b = intent.getBooleanExtra(VideoComponentCallback.r, false);
this.f70270c = intent.getBooleanExtra("support_edit_video", false);
this.f70272d = intent.getBooleanExtra("support_jump_gif_chooser", false);
this.f70274e = intent.getBooleanExtra(f70253b, false);
this.g = intent.getIntExtra(PeakConstants.cZ, 0);
this.f70276f = intent.getBooleanExtra(FlowComponentInterface.f15545f, false);
this.f70278g = intent.getBooleanExtra("enable_edit_video", false);
this.f70271d = intent.getStringExtra("uin");
this.f70273e = intent.getStringExtra("file_send_path");
this.f70256a = intent.getLongExtra(PeakConstants.bx, 0L);
this.f70255a = intent.getIntExtra(PeakConstants.f69365E, 2);
this.p = intent.getBooleanExtra("preview_video", false);
this.h = intent.getIntExtra("video_type", 0);
this.f70266b = intent.getLongExtra("start_time", 0L);
this.f70269c = intent.getLongExtra(PeakConstants.bL, 0L);
this.f70279h = intent.getStringExtra(PeakConstants.bR);
this.f70257a = intent.getBundleExtra(ShortVideoConstants.aB);
this.f70275f = intent.getStringExtra("topicId");
this.f70280h = intent.getBooleanExtra("enterPtu", false);
this.f70281i = intent.getStringExtra("callback");
this.j = intent.getStringExtra(FlowCameraConstant.r);
this.m = intent.getBooleanExtra("enable_priv_list", true);
this.f70282i = intent.getBooleanExtra("enable_input_text", true);
this.f70283j = intent.getBooleanExtra("enable_sync_qzone", false);
this.f70284k = intent.getBooleanExtra(FlowCameraConstant.t, false);
this.f70277g = intent.getStringExtra(FlowCameraConstant.v);
this.f70285l = intent.getBooleanExtra(FlowCameraConstant.x, true);
this.n = intent.getBooleanExtra(FlowCameraConstant.z, true);
this.o = intent.getBooleanExtra(FlowCameraConstant.G, false);
this.f70262a = (LocalMediaInfo) intent.getSerializableExtra(PeakConstants.cX);
this.i = intent.getIntExtra(PeakConstants.cW, -1);
this.k = intent.getStringExtra(PeakConstants.cV);
this.l = intent.getStringExtra(PeakConstants.cY);
AppRuntime appRuntime = getAppRuntime();
if (appRuntime != null && (appRuntime instanceof QQAppInterface)) {
this.f70271d = TextUtils.isEmpty(this.f70271d) ? getAppRuntime().getAccount() : this.f70271d;
if (((QQAppInterface) appRuntime).m4707d()) {
Toast.makeText(getApplicationContext(), "正在通话中,请结束通话后再试", 1).show();
QzoneVideoBeaconReport.a(this.f70271d, QzoneVideoBeaconReport.h, QzoneVideoBeaconReport.n, null);
finish();
return;
} else if (QavCameraUsage.b(BaseApplicationImpl.getContext())) {
QzoneVideoBeaconReport.a(this.f70271d, QzoneVideoBeaconReport.h, QzoneVideoBeaconReport.o, null);
finish();
return;
} else {
String m7876a = VideoEnvironment.m7876a();
File file = new File(ShortVideoSoLoad.getShortVideoSoPath(BaseApplicationImpl.getContext()) + m7876a);
if (m7876a == null || !file.exists()) {
setContentView(R.layout.f58370name_res_0x7f0307e9);
a();
this.f70264a.set(true);
QQShortVideoHandler qQShortVideoHandler = (QQShortVideoHandler) ((EarlyDownloadManager) appRuntime.getManager(76)).a(QQShortVideoHandler.f88989b);
if (qQShortVideoHandler != null) {
PtvFilterSoLoad.m8056a(this.app, (Context) BaseApplicationImpl.getContext());
qQShortVideoHandler.a(new xzu(this));
qQShortVideoHandler.a(true);
return;
}
return;
}
}
} else if (QLog.isColorLevel()) {
QLog.d(f98416a, 2, "app is not QQAppInterface");
}
b();
}
public void a() {
setTitle("短视频");
this.f70259a = (ProgressBar) findViewById(R.id.f56257name_res_0x7f0923de);
this.f70260a = (TextView) findViewById(R.id.f56256name_res_0x7f0923dd);
this.f70261a = (URLImageView) findViewById(R.id.f56258name_res_0x7f0923df);
this.f70261a.setImageURL(f70254c);
}
public void b() {
if (getAppRuntime() == null && TextUtils.isEmpty(this.f70271d)) {
if (QLog.isColorLevel()) {
QLog.e(f98416a, 2, "startQZoneVideo, getAppRunime and uin are null");
}
QQToast.a(this, "短视频启动失败", 0).m9833a();
QzoneVideoBeaconReport.a(null, QzoneVideoBeaconReport.h, "1000", null);
finish();
return;
}
QZoneHelper.UserInfo a2 = QZoneHelper.UserInfo.a();
a2.f70173a = TextUtils.isEmpty(this.f70271d) ? getAppRuntime().getAccount() : this.f70271d;
String stringExtra = getIntent().getStringExtra("refer");
QLog.i(f98416a, 1, "isSupportRecord=" + this.f70265a + ",isSupportTrim=" + this.f70268b + ",isPreviewVideo" + this.p + ",refer=" + stringExtra + ",videoRefer=" + this.f70279h);
if (this.f70265a) {
QZoneHelper.a(this.app, this, a2, 10009, this.f70268b, this.f70274e, stringExtra, this.f70279h, this.f70276f, this.f70278g, this.f70275f, this.f70280h, this.f70281i, this.j, this.f70282i, this.m, this.f70283j, this.f70284k, this.f70277g, this.f70285l, this.n, this.o, this.g);
QzoneVideoBeaconReport.a(a2.f70173a, QzoneVideoBeaconReport.h, "0", "record");
c();
} else if (this.f70268b) {
QZoneHelper.a(this, a2, this.f70273e, this.f70256a, 10009, this.f70255a, stringExtra, this.f70279h);
QzoneVideoBeaconReport.a(a2.f70173a, QzoneVideoBeaconReport.h, "1", "trim");
} else if (this.p) {
Intent intent = new Intent(getApplicationContext(), PreviewVideoActivity.class);
intent.putExtra(PeakConstants.bI, this.f70273e);
intent.putExtra("video_type", this.h);
intent.putExtra("start_time", this.f70266b);
intent.putExtra(PeakConstants.bL, this.f70269c);
intent.putExtra(ShortVideoConstants.aB, this.f70257a);
startActivity(intent);
overridePendingTransition(R.anim.f37550name_res_0x7f040014, R.anim.f37552name_res_0x7f040016);
} else if (this.f70270c) {
Intent a3 = EditVideoActivity.a(this, this.k, (ArrayList) getIntent().getSerializableExtra(PeakConstants.f69416o), this.f70262a, getIntent().getIntExtra(PeakConstants.f69417p, 150), 3);
if (a3 != null) {
a3.setClass(getApplicationContext(), EditVideoActivity.class);
a3.putExtras(getIntent());
QzonePluginProxyActivity.a(a3, this.l);
a3.putExtra(PeakConstants.br, this.l);
a3.putExtra(PluginStatic.PARAM_CLEAR_TOP, true);
a3.putExtra("PhotoConst.IS_CALL_IN_PLUGIN", true);
a3.putExtra("PhotoConst.PLUGIN_NAME", "QZone");
a3.putExtra("PhotoConst.PLUGIN_APK", PluginInfo.f97971b);
a3.putExtra(PeakConstants.cT, true);
startActivity(a3);
}
} else if (this.f70272d) {
Intent intent2 = getIntent();
intent2.setClassName(getIntent().getStringExtra(PeakConstants.bs), getIntent().getStringExtra(PeakConstants.br));
intent2.addFlags(603979776);
QZoneHelper.a(this, "", intent2, -1);
}
if ("video_interact".equals(this.f70279h)) {
Intent intent3 = new Intent(this, RecordSVInteractActivity.class);
intent3.putExtras(this.f70257a);
intent3.setFlags(33554432);
startActivity(intent3);
overridePendingTransition(R.anim.f37755name_res_0x7f0400e1, 0);
}
finish();
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
finish();
}
private void c() {
switch (this.g) {
case 1:
LpReportInfo_pf00064.allReport(612, 1, 1);
if (QLog.isColorLevel()) {
QLog.i(f98416a, 2, "entry source plus report");
return;
}
return;
case 2:
LpReportInfo_pf00064.allReport(612, 1, 2);
if (QLog.isColorLevel()) {
QLog.i(f98416a, 2, "entry source quick left slide report");
return;
}
return;
default:
return;
}
}
}