QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 BaseSupervisionHistoryModule.java 源代码,内容仅作参考
package com.tencent.ilive.commonpages.room.basemodule;
import android.content.Context;
import android.text.TextUtils;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Observer;
import com.tencent.falco.base.libapi.datareport.DataReportInterface;
import com.tencent.falco.base.libapi.generalinfo.AppGeneralInfoService;
import com.tencent.falco.base.libapi.imageloader.ImageLoaderInterface;
import com.tencent.falco.base.libapi.log.LogInterface;
import com.tencent.falco.base.libapi.toast.ToastInterface;
import com.tencent.falco.utils.StringUtil;
import com.tencent.falco.utils.UIUtil;
import com.tencent.ilive.pages.room.RoomBizContext;
import com.tencent.ilive.pages.room.bizmodule.RoomBizModule;
import com.tencent.ilive.pages.room.events.ShowSupervisionHistoryEvent;
import com.tencent.ilive.supervisionhistorycomponent_interface.SupervisionHistoryAdapter;
import com.tencent.ilive.supervisionhistorycomponent_interface.SupervisionHistoryComponent;
import com.tencent.ilive.supervisionhistorycomponent_interface.model.PunishedPerson;
import com.tencent.ilivesdk.liveconfigservice_interface.LiveConfigServiceInterface;
import com.tencent.ilivesdk.supervisionservice_interface.BanChatInterface;
import com.tencent.ilivesdk.supervisionservice_interface.KickOutRoomInterface;
import com.tencent.ilivesdk.supervisionservice_interface.SupervisionServiceInterface;
import com.tencent.ilivesdk.supervisionservice_interface.model.PunishedUserInfo;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;
public class BaseSupervisionHistoryModule extends RoomBizModule {
protected SupervisionHistoryComponent f12033a;
public List<PunishedPerson> a(List<PunishedUserInfo> list) {
if (list == null || list.isEmpty()) {
return null;
}
ArrayList arrayList = new ArrayList();
for (PunishedUserInfo punishedUserInfo : list) {
if (punishedUserInfo.f13289a != null) {
PunishedPerson punishedPerson = new PunishedPerson();
punishedPerson.f12437a = punishedUserInfo.f13289a.f13296c;
punishedPerson.f12438b = punishedUserInfo.f13289a.f13297d;
punishedPerson.f12439c = punishedUserInfo.f13289a.g;
punishedPerson.f12440d = punishedUserInfo.f13289a.h;
punishedPerson.e = punishedUserInfo.f13290b;
arrayList.add(punishedPerson);
}
}
return arrayList;
}
private void i() {
this.f12033a = (SupervisionHistoryComponent) u().a(SupervisionHistoryComponent.class).a();
this.f12033a.a(new SupervisionHistoryAdapter() {
@Override
public LogInterface a() {
return (LogInterface) BaseSupervisionHistoryModule.this.F().a(LogInterface.class);
}
@Override
public String a(String str, String str2, int i) {
if (!StringUtil.a(str)) {
return str;
}
if (StringUtil.a(str2)) {
return "";
}
String str3 = null;
try {
JSONObject a2 = ((LiveConfigServiceInterface) BaseSupervisionHistoryModule.this.F().a(LiveConfigServiceInterface.class)).a("common_urls");
if (a2 != null) {
String str4 = (String) a2.get("person_head_pic");
if (!StringUtil.a(str4)) {
str3 = str4;
}
}
} catch (JSONException e) {
e.printStackTrace();
}
if (TextUtils.isEmpty(str3)) {
str3 = "https://nowpic.gtimg.com/hy_personal/";
}
AppGeneralInfoService appGeneralInfoService = (AppGeneralInfoService) BaseSupervisionHistoryModule.this.F().a(AppGeneralInfoService.class);
StringBuilder sb = new StringBuilder();
appGeneralInfoService.g();
sb.append(str3);
sb.append("%s/%d");
return String.format(sb.toString(), str2, Integer.valueOf(i));
}
@Override
public void a(int i, int i2, final SupervisionHistoryAdapter.GetPunishHistoryCallback getPunishHistoryCallback) {
RoomBizContext o = BaseSupervisionHistoryModule.this.o();
if (o == null) {
return;
}
((SupervisionServiceInterface) BaseSupervisionHistoryModule.this.F().a(SupervisionServiceInterface.class)).c().a(o.b().f13249a, o.a().f13259a, i, i2, new KickOutRoomInterface.QueryKickOutHistoryCallback() {
@Override
public void a(List<PunishedUserInfo> list, int i3, boolean z) {
if (list == null && !z) {
getPunishHistoryCallback.a(false, -1, "");
}
SupervisionHistoryAdapter.GetPunishHistoryCallback getPunishHistoryCallback2 = getPunishHistoryCallback;
if (getPunishHistoryCallback2 != null) {
getPunishHistoryCallback2.a(BaseSupervisionHistoryModule.this.a(list), i3, z);
}
}
@Override
public void a(boolean z, int i3, String str) {
SupervisionHistoryAdapter.GetPunishHistoryCallback getPunishHistoryCallback2 = getPunishHistoryCallback;
if (getPunishHistoryCallback2 != null) {
getPunishHistoryCallback2.a(z, i3, str);
}
}
});
}
@Override
public void a(long j, final SupervisionHistoryAdapter.CancelPunishCallback cancelPunishCallback) {
RoomBizContext o = BaseSupervisionHistoryModule.this.o();
if (o == null) {
return;
}
((SupervisionServiceInterface) BaseSupervisionHistoryModule.this.F().a(SupervisionServiceInterface.class)).c().a(o.b().f13249a, o.a().f13259a, j, new KickOutRoomInterface.KickOutUserCallback() {
@Override
public void a(long j2) {
SupervisionHistoryAdapter.CancelPunishCallback cancelPunishCallback2 = cancelPunishCallback;
if (cancelPunishCallback2 != null) {
cancelPunishCallback2.a(j2);
}
}
@Override
public void a(boolean z, int i, String str) {
SupervisionHistoryAdapter.CancelPunishCallback cancelPunishCallback2 = cancelPunishCallback;
if (cancelPunishCallback2 != null) {
cancelPunishCallback2.a(z, i, str);
}
}
});
}
@Override
public ImageLoaderInterface b() {
return (ImageLoaderInterface) BaseSupervisionHistoryModule.this.F().a(ImageLoaderInterface.class);
}
@Override
public void b(int i, int i2, final SupervisionHistoryAdapter.GetPunishHistoryCallback getPunishHistoryCallback) {
RoomBizContext o = BaseSupervisionHistoryModule.this.o();
if (o == null) {
return;
}
((SupervisionServiceInterface) BaseSupervisionHistoryModule.this.F().a(SupervisionServiceInterface.class)).b().a(o.b().f13249a, o.a().f13259a, i, i2, new BanChatInterface.QueryBanedHistoryCallback() {
@Override
public void a(List<PunishedUserInfo> list, int i3, boolean z) {
if (list == null && !z) {
getPunishHistoryCallback.a(false, -1, "");
}
SupervisionHistoryAdapter.GetPunishHistoryCallback getPunishHistoryCallback2 = getPunishHistoryCallback;
if (getPunishHistoryCallback2 != null) {
getPunishHistoryCallback2.a(BaseSupervisionHistoryModule.this.a(list), i3, z);
}
}
@Override
public void a(boolean z, int i3, String str) {
SupervisionHistoryAdapter.GetPunishHistoryCallback getPunishHistoryCallback2 = getPunishHistoryCallback;
if (getPunishHistoryCallback2 != null) {
getPunishHistoryCallback2.a(z, i3, str);
}
}
});
}
@Override
public void b(long j, final SupervisionHistoryAdapter.CancelPunishCallback cancelPunishCallback) {
RoomBizContext o = BaseSupervisionHistoryModule.this.o();
if (o == null) {
return;
}
((SupervisionServiceInterface) BaseSupervisionHistoryModule.this.F().a(SupervisionServiceInterface.class)).b().a(o.b().f13249a, o.a().f13259a, j, new BanChatInterface.SetBanChatCallback() {
@Override
public void a(long j2) {
SupervisionHistoryAdapter.CancelPunishCallback cancelPunishCallback2 = cancelPunishCallback;
if (cancelPunishCallback2 != null) {
cancelPunishCallback2.a(j2);
}
}
@Override
public void a(boolean z, int i, String str) {
SupervisionHistoryAdapter.CancelPunishCallback cancelPunishCallback2 = cancelPunishCallback;
if (cancelPunishCallback2 != null) {
cancelPunishCallback2.a(z, i, str);
}
}
});
}
@Override
public ToastInterface c() {
return (ToastInterface) BaseSupervisionHistoryModule.this.F().a(ToastInterface.class);
}
@Override
public DataReportInterface d() {
return (DataReportInterface) BaseSupervisionHistoryModule.this.F().a(DataReportInterface.class);
}
});
}
@Override
public void a(final Context context) {
super.a(context);
i();
w().a(ShowSupervisionHistoryEvent.class, new Observer<ShowSupervisionHistoryEvent>() {
@Override
public void onChanged(ShowSupervisionHistoryEvent showSupervisionHistoryEvent) {
if (BaseSupervisionHistoryModule.this.f12033a != null) {
BaseSupervisionHistoryModule.this.f12033a.a((FragmentActivity) context, !UIUtil.a(r0));
}
}
});
}
@Override
public void a(boolean z) {
super.a(z);
}
}