QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 ShareBuilder.java 源代码,内容仅作参考
package com.tencent.ilive.components.sharecomponent;
import android.text.TextUtils;
import com.tencent.falco.base.libapi.datareport.DataReportInterface;
import com.tencent.falco.base.libapi.generalinfo.AppGeneralInfoService;
import com.tencent.falco.base.libapi.log.LogInterface;
import com.tencent.falco.base.libapi.login.LoginServiceInterface;
import com.tencent.falco.base.libapi.qqsdk.QQSdkInterface;
import com.tencent.falco.base.libapi.toast.ToastInterface;
import com.tencent.falco.base.libapi.weibosdk.WeiboSdkInterface;
import com.tencent.falco.base.libapi.wxsdk.WxSdkInterface;
import com.tencent.ilive.base.component.BaseComponentBuilder;
import com.tencent.ilive.sharecomponent.ShareComponentImpl;
import com.tencent.ilive.sharecomponent_interface.ShareAdapter;
import com.tencent.ilive.sharecomponent_interface.ShareUtils;
import com.tencent.ilive.sharecomponent_interface.model.ShareChannel;
import com.tencent.ilive.sharecomponent_interface.model.ShareData;
import com.tencent.ilivesdk.liveconfigservice_interface.LiveConfigServiceInterface;
import com.tencent.ilivesdk.roomservice_interface.RoomServiceInterface;
import com.tencent.ilivesdk.uicustomservice_interface.UICustomServiceInterface;
public class ShareBuilder extends BaseComponentBuilder {
@Override
public Object d() {
ShareComponentImpl shareComponentImpl = new ShareComponentImpl();
shareComponentImpl.a(new ShareAdapter() {
private ShareData b(ShareChannel shareChannel) {
ShareData shareData = new ShareData();
shareData.f12433a = j().a().f13253a.f13259a;
shareData.f12436d = p();
shareData.e = q();
shareData.f12435c = c(shareChannel);
shareData.f12434b = j().a().f13253a.f13261c;
return shareData;
}
private String c(ShareChannel shareChannel) {
long j = j().a().f13253a.f13259a;
long j2 = ((LoginServiceInterface) ShareBuilder.this.b().a(LoginServiceInterface.class)).a().f10859a;
return ((LiveConfigServiceInterface) ShareBuilder.this.a().a(LiveConfigServiceInterface.class)).a("share_url", "https://ilive.qq.com/base/h5/share.html") + "?fromid=" + d(shareChannel) + "&roomid=" + j + "&fromuser=" + j2;
}
private int d(ShareChannel shareChannel) {
if (shareChannel == ShareChannel.QQ) {
return 12;
}
if (shareChannel == ShareChannel.QZONE) {
return 13;
}
if (shareChannel == ShareChannel.WX) {
return 10;
}
if (shareChannel == ShareChannel.WX_FRIENDS) {
return 11;
}
return shareChannel == ShareChannel.SINA ? 14 : -1;
}
private RoomServiceInterface j() {
return (RoomServiceInterface) ShareBuilder.this.c().a(RoomServiceInterface.class);
}
private ShareData k() {
return b(ShareChannel.QQ);
}
private ShareData l() {
return b(ShareChannel.QZONE);
}
private ShareData m() {
return b(ShareChannel.WX);
}
private ShareData n() {
ShareData b2 = b(ShareChannel.WX_FRIENDS);
b2.e = b2.f12436d;
return b2;
}
private ShareData o() {
String str;
ShareData b2 = b(ShareChannel.SINA);
String str2 = j().a().f13253a.f13260b;
String str3 = j().a().f13254b.f13251c;
if (TextUtils.isEmpty(str2)) {
str = "#NOW# " + str3 + "正在直播,快来围观,点此进入>>";
} else {
str = "#NOW#" + str3 + "正在直播" + ShareUtils.a(str2) + "快来围观,点此进入>>";
}
b2.e = str;
return b2;
}
private String p() {
return j().a().f13254b.f13251c + "正在直播,快来捧场!";
}
private String q() {
String str = j().a().f13253a.f13260b;
if (TextUtils.isEmpty(str)) {
return "【欢迎来到我的直播间】";
}
return "【" + str + "】";
}
@Override
public LogInterface a() {
return (LogInterface) ShareBuilder.this.a().a(LogInterface.class);
}
@Override
public ShareData a(ShareChannel shareChannel) {
if (j().a() != null && j().a().f13253a != null && j().a().f13254b != null) {
if (shareChannel == ShareChannel.QQ) {
return k();
}
if (shareChannel == ShareChannel.QZONE) {
return l();
}
if (shareChannel == ShareChannel.WX) {
return m();
}
if (shareChannel == ShareChannel.WX_FRIENDS) {
return n();
}
if (shareChannel == ShareChannel.SINA) {
return o();
}
}
return null;
}
@Override
public QQSdkInterface b() {
return (QQSdkInterface) ShareBuilder.this.a().a(QQSdkInterface.class);
}
@Override
public WxSdkInterface c() {
return (WxSdkInterface) ShareBuilder.this.a().a(WxSdkInterface.class);
}
@Override
public WeiboSdkInterface d() {
return (WeiboSdkInterface) ShareBuilder.this.a().a(WeiboSdkInterface.class);
}
@Override
public ToastInterface e() {
return (ToastInterface) ShareBuilder.this.a().a(ToastInterface.class);
}
@Override
public DataReportInterface f() {
return (DataReportInterface) ShareBuilder.this.a().a(DataReportInterface.class);
}
@Override
public LoginServiceInterface g() {
return (LoginServiceInterface) ShareBuilder.this.b().a(LoginServiceInterface.class);
}
@Override
public AppGeneralInfoService h() {
return (AppGeneralInfoService) ShareBuilder.this.a().a(AppGeneralInfoService.class);
}
@Override
public UICustomServiceInterface i() {
return (UICustomServiceInterface) ShareBuilder.this.a().a(UICustomServiceInterface.class);
}
});
return shareComponentImpl;
}
}