QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 CameraTranslateShareController.java 源代码,内容仅作参考
package com.tencent.mtt.external.explorerone.newcamera.scan.translate.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.CameraTranslateSharePage;
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 CameraTranslateShareController implements IShareStateListener, QBAlertDialogBase.HandleBackListener {
private CameraTranslateShareData f53577b;
private CameraNativePageBase f53578c;
private MttLoadingDialog f53579d;
private int f;
private IShare f53576a = (IShare) QBContext.getInstance().getService(IShare.class);
private CameraCommonShareManager e = new CameraCommonShareManager();
public CameraTranslateShareController(CameraTranslateShareData cameraTranslateShareData, CameraNativePageBase cameraNativePageBase, int i) {
this.f53577b = cameraTranslateShareData;
this.f53578c = cameraNativePageBase;
this.f = i;
}
private void a(int i, int i2, int i3) {
String str;
if (i2 == 99) {
return;
}
if (i != 21) {
}
if (i2 != 1) {
if (i2 != 8) {
if (i2 != 3) {
if (i2 != 4) {
return;
}
if (i3 == 12) {
str = "BZST029";
} else if (i3 != 13) {
return;
} else {
str = "BZST053";
}
} else if (i3 == 12) {
str = "BZST030";
} else if (i3 != 13) {
return;
} else {
str = "BZST054";
}
} else if (i3 == 12) {
str = "BZST028";
} else if (i3 != 13) {
return;
} else {
str = "BZST052";
}
} else if (i3 == 12) {
str = "BZST027";
} else if (i3 != 13) {
return;
} else {
str = "BZST051";
}
CameraStatConst.b(str);
}
private void a(String str) {
f();
this.f53579d = new MttLoadingDialog(this.f53578c.getContext());
this.f53579d.a(this);
this.f53579d.a(str);
this.f53579d.h(false);
if (this.f53579d.isShowing()) {
return;
}
this.f53579d.show();
}
private void e() {
String str;
int i = this.f;
if (i == 12) {
str = "BZST032";
} else if (i != 13) {
return;
} else {
str = "BZST056";
}
CameraStatConst.b(str);
}
private void f() {
MttLoadingDialog mttLoadingDialog = this.f53579d;
if (mttLoadingDialog != null) {
mttLoadingDialog.dismiss();
this.f53579d = null;
}
}
@Override
public void a() {
f();
}
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.f53578c instanceof CameraTranslateSharePage) {
CameraTranslateSharePage cameraTranslateSharePage = (CameraTranslateSharePage) this.f53578c;
cameraShareBundleData = d().get(cameraTranslateSharePage.getCurrentSelectIndex());
bitmap = cameraShareBundleData.f51642b;
i2 = cameraTranslateSharePage.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;
}
if (cameraShareBundleData != null) {
a(i2, i, cameraShareBundleData.g);
}
this.f53576a.addShareStateListener(this);
if (cameraShareBundleData != null && cameraShareBundleData.e == 2) {
this.e.a(this.f53578c.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;
CameraTranslateShareController.this.f53576a.doShare(shareBundle);
}
});
}
});
return;
}
a(MttResources.l(R.string.t1));
shareBundle.i = bitmap;
shareBundle.f45014b = this.f53577b.f53586a;
shareBundle.f45015c = MttResources.l(R.string.r1);
this.f53576a.doShare(shareBundle);
} catch (Throwable unused) {
}
}
public void b() {
IShare iShare = this.f53576a;
if (iShare != null) {
iShare.removeShareStateListener(this);
}
}
public void c() {
CameraNativePageBase cameraNativePageBase = this.f53578c;
if (cameraNativePageBase == null) {
return;
}
cameraNativePageBase.a(4, this.f53576a.canShareTo(4));
this.f53578c.a(1, this.f53576a.canShareTo(1));
this.f53578c.a(3, this.f53576a.canShareTo(3));
}
public List<CameraShareBundleData> d() {
return this.f53577b.h.l;
}
@Override
public void onShareFinished(int i, int i2) {
String str;
CameraCommonShareManager cameraCommonShareManager = this.e;
if (cameraCommonShareManager != null) {
cameraCommonShareManager.a();
}
f();
IShare iShare = this.f53576a;
if (iShare != null) {
iShare.removeShareStateListener(this);
}
if (i == 0) {
if ((i2 != 1 && i2 != 8 && i2 != 3 && i2 != 4) || this.f != 15) {
return;
} else {
str = "ARTS130_1";
}
} else {
if (i2 == 1) {
e();
return;
}
if (i2 == 8) {
int i3 = this.f;
if (i3 == 12) {
str = "BZST034";
} else if (i3 != 13) {
return;
} else {
str = "BZST058";
}
} else if (i2 == 3) {
int i4 = this.f;
if (i4 == 12) {
str = "BZST038";
} else if (i4 != 13) {
return;
} else {
str = "BZST062";
}
} else {
if (i2 != 4) {
return;
}
int i5 = this.f;
if (i5 == 12) {
str = "BZST036";
} else if (i5 != 13) {
return;
} else {
str = "BZST060";
}
}
}
CameraStatConst.b(str);
}
@Override
public void onShareInfoUpdated() {
CameraCommonShareManager cameraCommonShareManager = this.e;
if (cameraCommonShareManager != null) {
cameraCommonShareManager.a();
}
f();
}
}