QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 CameraTopicShareController.java 源代码,内容仅作参考
package com.tencent.mtt.external.explorerone.newcamera.scan.topic.share;
import android.graphics.Bitmap;
import android.text.TextUtils;
import com.tencent.common.threadpool.BrowserExecutorSupplier;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.browser.share.facade.IShare;
import com.tencent.mtt.browser.share.facade.IShareStateListener;
import com.tencent.mtt.browser.share.facade.ShareBundle;
import com.tencent.mtt.external.explorerone.camera.CameraNativePageBase;
import com.tencent.mtt.external.explorerone.camera.data.share.CameraShareBundleData;
import com.tencent.mtt.external.explorerone.camera.page.CameraTopicSharePage;
import com.tencent.mtt.external.explorerone.camera.utils.CameraStatConst;
import com.tencent.mtt.external.explorerone.newcamera.ar.ui.share.manage.CameraCommonShareManager;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.view.dialog.alert.MttLoadingDialog;
import com.tencent.mtt.view.dialog.alert.QBAlertDialogBase;
import com.tencent.tar.Config;
import java.util.List;
public class CameraTopicShareController implements IShareStateListener, QBAlertDialogBase.HandleBackListener {
private CameraShareTopicData f53409b;
private CameraNativePageBase f53410c;
private MttLoadingDialog f53411d;
private int f;
private IShare f53408a = (IShare) QBContext.getInstance().getService(IShare.class);
private CameraCommonShareManager e = new CameraCommonShareManager();
public CameraTopicShareController(CameraShareTopicData cameraShareTopicData, CameraNativePageBase cameraNativePageBase, int i) {
this.f53409b = cameraShareTopicData;
this.f53410c = cameraNativePageBase;
this.f = i;
}
private void a(int i, int i2, int i3) {
if (i2 == 99) {
return;
}
if (i != 21) {
}
if (i2 == 1) {
g(i3);
return;
}
if (i2 == 8) {
f(i3);
} else if (i2 == 3) {
d(i3);
} else {
if (i2 != 4) {
return;
}
e(i3);
}
}
private void a(String str) {
e();
this.f53411d = new MttLoadingDialog(this.f53410c.getContext());
this.f53411d.a(this);
this.f53411d.a(str);
this.f53411d.h(false);
if (this.f53411d.isShowing()) {
return;
}
this.f53411d.show();
}
private void b(int i) {
String str;
if (i == 1) {
int i2 = this.f;
if (i2 == 12) {
str = "BZST032";
} else if (i2 != 13) {
return;
} else {
str = "BZST056";
}
} else if (i == 8) {
int i3 = this.f;
if (i3 == 12) {
str = "BZST034";
} else if (i3 != 13) {
return;
} else {
str = "BZST058";
}
} else if (i == 3) {
int i4 = this.f;
if (i4 == 12) {
str = "BZST038";
} else if (i4 != 13) {
return;
} else {
str = "BZST062";
}
} else {
if (i != 4) {
return;
}
int i5 = this.f;
if (i5 == 12) {
str = "BZST036";
} else if (i5 != 13) {
return;
} else {
str = "BZST060";
}
}
CameraStatConst.b(str);
}
private void c(int i) {
String str;
if (i == 1) {
int i2 = this.f;
if (i2 == 12) {
str = "BZST031";
} else if (i2 != 13) {
return;
} else {
str = "BZST055";
}
} else if (i == 8) {
int i3 = this.f;
if (i3 == 12) {
str = "BZST033";
} else if (i3 != 13) {
return;
} else {
str = "BZST057";
}
} else if (i == 3) {
int i4 = this.f;
if (i4 == 12) {
str = "BZST037";
} else if (i4 != 13) {
return;
} else {
str = "BZST061";
}
} else {
if (i != 4) {
return;
}
int i5 = this.f;
if (i5 == 12) {
str = "BZST035";
} else if (i5 != 13) {
return;
} else {
str = "BZST059";
}
}
CameraStatConst.b(str);
}
private void d(int i) {
String str;
if (i == 12) {
str = "BZST030";
} else if (i != 13) {
return;
} else {
str = "BZST054";
}
CameraStatConst.b(str);
}
private void e() {
MttLoadingDialog mttLoadingDialog = this.f53411d;
if (mttLoadingDialog != null) {
mttLoadingDialog.dismiss();
this.f53411d = null;
}
}
private void e(int i) {
String str;
if (i == 12) {
str = "BZST029";
} else if (i != 13) {
return;
} else {
str = "BZST053";
}
CameraStatConst.b(str);
}
private void f(int i) {
String str;
if (i == 12) {
str = "BZST028";
} else if (i != 13) {
return;
} else {
str = "BZST052";
}
CameraStatConst.b(str);
}
private void g(int i) {
String str;
if (i == 12) {
str = "BZST027";
} else if (i != 13) {
return;
} else {
str = "BZST051";
}
CameraStatConst.b(str);
}
@Override
public void a() {
e();
}
public void a(int i) {
final Bitmap bitmap;
int i2;
final ShareBundle shareBundle = new ShareBundle(1);
shareBundle.w = i;
try {
char c2 = 65535;
CameraShareBundleData cameraShareBundleData = null;
if (this.f53410c instanceof CameraTopicSharePage) {
CameraTopicSharePage cameraTopicSharePage = (CameraTopicSharePage) this.f53410c;
cameraShareBundleData = d().get(cameraTopicSharePage.getCurrentSelectIndex());
bitmap = cameraShareBundleData.f51642b;
i2 = cameraTopicSharePage.getCurrentSelectedTemplateId();
} else {
bitmap = null;
i2 = -1;
}
if (cameraShareBundleData == null) {
return;
}
String str = cameraShareBundleData.f;
int hashCode = str.hashCode();
if (hashCode != -815756977) {
if (hashCode != -815497882) {
if (hashCode == 2104124699 && str.equals("qb://camera/marker")) {
c2 = 0;
}
} else if (str.equals("qb://camera/slam")) {
c2 = 1;
}
} else if (str.equals("qb://camera/jump")) {
c2 = 2;
}
final String str2 = c2 != 0 ? c2 != 1 ? c2 != 2 ? "" : "newyear" : "slam" : Config.MARKER_APP_NAME;
if (bitmap == null || bitmap.isRecycled()) {
return;
}
a(i2, i, cameraShareBundleData.g);
this.f53408a.addShareStateListener(this);
if (cameraShareBundleData != null && cameraShareBundleData.e == 2) {
this.e.a(this.f53410c.getContext(), cameraShareBundleData, new CameraCommonShareManager.IARShareCallback() {
@Override
public void a(int i3) {
}
@Override
public void a(final String str3, boolean z) {
if (!z || TextUtils.isEmpty(str3)) {
return;
}
BrowserExecutorSupplier.forMainThreadTasks().execute(new Runnable() {
@Override
public void run() {
ShareBundle shareBundle2 = shareBundle;
ShareBundle shareBundle3 = shareBundle;
shareBundle2.f45013a = 0;
shareBundle.f45014b = MttResources.l(R.string.r0);
shareBundle.f45015c = MttResources.l(R.string.r1);
shareBundle.f45016d = "https://res.imtt.qq.com/webar/share/html/index.html?videoId=" + str3 + "&type=" + str2;
shareBundle.i = bitmap;
CameraTopicShareController.this.f53408a.doShare(shareBundle);
}
});
}
});
return;
}
a(MttResources.l(R.string.t1));
shareBundle.i = bitmap;
shareBundle.f45014b = this.f53409b.f53404a;
shareBundle.f45015c = MttResources.l(R.string.r1);
this.f53408a.doShare(shareBundle);
} catch (Throwable unused) {
}
}
public void b() {
IShare iShare = this.f53408a;
if (iShare != null) {
iShare.removeShareStateListener(this);
}
}
public void c() {
CameraNativePageBase cameraNativePageBase = this.f53410c;
if (cameraNativePageBase == null) {
return;
}
cameraNativePageBase.a(4, this.f53408a.canShareTo(4));
this.f53410c.a(1, this.f53408a.canShareTo(1));
this.f53410c.a(3, this.f53408a.canShareTo(3));
}
public List<CameraShareBundleData> d() {
return this.f53409b.h.l;
}
@Override
public void onShareFinished(int i, int i2) {
CameraCommonShareManager cameraCommonShareManager = this.e;
if (cameraCommonShareManager != null) {
cameraCommonShareManager.a();
}
e();
IShare iShare = this.f53408a;
if (iShare != null) {
iShare.removeShareStateListener(this);
}
if (i == 0) {
c(i2);
} else {
b(i2);
}
}
@Override
public void onShareInfoUpdated() {
CameraCommonShareManager cameraCommonShareManager = this.e;
if (cameraCommonShareManager != null) {
cameraCommonShareManager.a();
}
e();
}
}