91快播 v3.3.0版本的 MD5 值为:094b9519ad2388a8147509cb8a126145
以下内容为反编译后的 MainActivityV2.java 源代码,内容仅作参考
package com.theway.abc.v2.main;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import androidx.viewpager2.adapter.FragmentStateAdapter;
import androidx.viewpager2.widget.ViewPager2;
import anta.Ź.C0291;
import anta.ȉ.C0418;
import anta.ʹ.C0548;
import anta.ղ.C1158;
import anta.ق.C1263;
import anta.ۋ.C1350;
import anta.ಝ.C1948;
import anta.ຍ.C2176;
import anta.ᇱ.C2880;
import anta.ቔ.C3001;
import anta.ᐚ.C3434;
import anta.ᕻ.C3959;
import anta.ᗕ.C4155;
import anta.ᗕ.C4156;
import anta.ᚃ.C4296;
import anta.ᰣ.C5071;
import anta.ᰣ.C5076;
import anta.ᰣ.C5078;
import anta.ᰣ.InterfaceC5074;
import anta.ẓ.C5515;
import anta.Ặ.C5558;
import anta.ῥ.C5877;
import anta.ℸ.InterfaceC6017;
import anta.ⷚ.EnumC6526;
import anta.ㆇ.C6889;
import anta.㓉.ActivityC7274;
import anta.㕕.C7315;
import anta.㗝.C7380;
import anta.㗝.InterfaceC7378;
import anta.㘥.C7435;
import anta.㜛.AbstractApplicationC7572;
import anta.㟣.C7840;
import anta.㣝.C8123;
import anta.㣝.InterfaceC8127;
import anta.㧛.C8517;
import anta.㨮.C8575;
import anta.㨮.C8584;
import anta.㨮.C8598;
import anta.㨮.InterfaceC8574;
import anta.㩥.InterfaceC8706;
import anta.㩥.InterfaceC8709;
import anta.㩨.AbstractC8720;
import anta.㩨.AbstractC8726;
import anta.㩨.InterfaceC8716;
import anta.㪕.C8775;
import anta.㪕.C8777;
import anta.㪕.View$OnClickListenerC8776;
import anta.㪕.View$OnClickListenerC8779;
import anta.㮌.C9125;
import anta.㳂.C9466;
import anta.㶪.C9816;
import anta.䀛.C10606;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.kb91.app65.R;
import com.theway.abc.v2.analytics.AnalyticsHandler;
import com.theway.abc.v2.analytics.DomainHealthReport;
import com.theway.abc.v2.api.model.ADModel;
import com.theway.abc.v2.api.model.ADResponse;
import com.theway.abc.v2.api.model.AccountV2Response;
import com.theway.abc.v2.api.model.AppAD;
import com.theway.abc.v2.api.model.AppApiResponse;
import com.theway.abc.v2.api.model.AppUpdateInfo;
import com.theway.abc.v2.api.model.Domain;
import com.theway.abc.v2.api.model.DomainResponse;
import com.theway.abc.v2.api.model.GlobalSearchPlatform;
import com.theway.abc.v2.api.model.NeedCheckDomainModel;
import com.theway.abc.v2.api.model.ReportResponse;
import com.theway.abc.v2.api.model.SplashAD;
import com.theway.abc.v2.main.MainActivityV2;
import com.theway.abc.v2.main.view.NavTabLayout;
import com.theway.abc.v2.model.account.Account;
import com.theway.abc.v2.nidongde.global_search.launch.GlobalSearchLaunchActivity;
import com.theway.abc.v2.recharge.RechargeActivity;
import com.theway.entity.Videosource;
import com.umeng.commonsdk.UMLHelper;
import java.io.File;
import java.io.FileFilter;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import org.greenrobot.eventbus.ThreadMode;
import org.json.JSONArray;
import org.json.JSONObject;
import tv.danmaku.ijk.media.player.IjkMediaMeta;
public final class MainActivityV2 extends ActivityC7274 implements InterfaceC8574, C8517.InterfaceC8518 {
public static final int f25729 = 0;
public C8775 f25732;
public FragmentStateAdapter f25735;
public int f25737;
public Map<Integer, View> f25738 = new LinkedHashMap();
public final C0418 f25734 = new C0418();
public final C5078 f25741 = C5078.m4982();
public long f25736 = System.currentTimeMillis();
public final String f25733 = "MainActivityV2_TAG";
public final C6889 f25730 = new C6889();
public final C3434 f25740 = C3434.m3610();
public final C5076 f25739 = C5076.m4968();
public final List<GlobalSearchPlatform> f25731 = new ArrayList();
public static final class C11087 implements InterfaceC6017 {
public C11087() {
}
@Override
public void mo1104() {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
mainActivityV2.startActivity(RechargeActivity.C11206.m11684(mainActivityV2));
}
}
public static final class C11088 implements InterfaceC6017 {
@Override
public void mo1104() {
}
}
@Override
public void onBackPressed() {
long currentTimeMillis = System.currentTimeMillis();
if (currentTimeMillis - this.f25736 < 3000) {
this.f43.m15();
return;
}
this.f25736 = currentTimeMillis;
C7435.m6480(R.string.close_app_tip);
}
@Override
public void onCreate(Bundle bundle) {
getWindow().setStatusBarColor(getColor(R.color.v5_common_background));
super.onCreate(bundle);
C8775 c8775 = new C8775(this);
c8775.m7674(R.string.ndd_fetching_resource);
C8775 c87752 = c8775;
c87752.m7671(false);
this.f25732 = c87752;
Objects.requireNonNull(this.f25741);
Long valueOf = Long.valueOf(C5078.f12260.f3658.getLong("sp_first_enter_main_activity_time", 0L));
if (valueOf != null && valueOf.longValue() == 0) {
C5078 c5078 = this.f25741;
Long valueOf2 = Long.valueOf(System.currentTimeMillis());
Objects.requireNonNull(c5078);
C1263 c1263 = C5078.f12260;
c1263.f3660.putLong("sp_first_enter_main_activity_time", valueOf2.longValue());
c1263.f3660.apply();
}
setContentView(R.layout.activity_main_v2);
this.f25735 = new C8584(this);
ViewPager2 viewPager2 = (ViewPager2) m9842(R.id.mainContainer);
FragmentStateAdapter fragmentStateAdapter = this.f25735;
if (fragmentStateAdapter != null) {
viewPager2.setAdapter(fragmentStateAdapter);
FragmentStateAdapter fragmentStateAdapter2 = this.f25735;
if (fragmentStateAdapter2 != null) {
viewPager2.setOffscreenPageLimit(fragmentStateAdapter2.getItemCount());
viewPager2.setUserInputEnabled(false);
((NavTabLayout) m9842(R.id.bottomNavigation)).setOnNavigationItemSelectedListener(new BottomNavigationView.InterfaceC10948() {
@Override
public final boolean mo6161(MenuItem menuItem) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
C7840.m6785(menuItem, "menuItem");
((ViewPager2) mainActivityV2.m9842(R.id.mainContainer)).setCurrentItem(menuItem.getOrder(), false);
return true;
}
});
File externalFilesDir = getExternalFilesDir(null);
C7840.m6783(externalFilesDir);
C3434.m3610().f8357 = UMLHelper.init(new String[]{externalFilesDir.getPath(), InterfaceC5074.f12243, InterfaceC5074.f12245}, AbstractApplicationC7572.f16868.getApplicationInfo().publicSourceDir, 1, C0291.m640());
InterfaceC8127.C8128 c8128 = InterfaceC8127.f18011;
Objects.requireNonNull(C5078.m4982());
String string = C5078.f12260.f3658.getString("sp_key_available_domain", "https://apikb0203.xyz");
C7840.m6789(string, "getInstance().fetchAvailableDomain()");
Objects.requireNonNull(c8128);
C7840.m6785(string, "baseUrl");
C3959.C3961 value = InterfaceC8127.C8128.f18013.getValue();
C7840.m6789(value, "<get-retrofitBuilder>(...)");
C3959.C3961 c3961 = value;
c3961.m4214(string);
InterfaceC8127.C8128.f18014 = (InterfaceC8127) c3961.m4216().m4211(InterfaceC8127.class);
C7380.m6385().m6389(this);
List<String> m1451 = C1350.m1451();
if (((ArrayList) m1451).size() != 1) {
C8777 c8777 = new C8777(this);
String m1425 = C1350.m1425(R.string.multi_app_install_tips_uninstall);
C7840.m6789(m1425, "getString(R.string.multi…p_install_tips_uninstall)");
c8777.m7664(m1425);
String m14252 = C1350.m1425(R.string.multi_app_install_tips_uninstall_cancel);
C7840.m6789(m14252, "getString(R.string.multi…ll_tips_uninstall_cancel)");
c8777.m7663(m14252);
c8777.m7671(false);
C8575 c8575 = new C8575(this, m1451);
TextView textView = c8777.f19589;
C7840.m6783(textView);
textView.setOnClickListener(new View$OnClickListenerC8779(c8575, c8777));
C8598 c8598 = new C8598();
TextView textView2 = c8777.f19590;
C7840.m6783(textView2);
textView2.setOnClickListener(new View$OnClickListenerC8776(c8598, c8777));
c8777.m7674(R.string.hei_ke_ji_alert_dialog_title);
c8777.m7669(R.string.multi_app_install_tips_desc);
c8777.m7668();
}
C6889 c6889 = this.f25730;
Objects.requireNonNull(c8128);
InterfaceC8127 interfaceC8127 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC8127);
C8123 c8123 = C8123.f18004;
JSONObject m6995 = c8123.m6995();
m6995.put("page", 3);
m6995.put(IjkMediaMeta.IJKM_KEY_TYPE, new JSONArray((Collection) C2176.m2243("All")));
InterfaceC8716 m7610 = interfaceC8127.m7023(c8123.m6993(m6995)).m7610(new InterfaceC8709() {
@Override
public final Object apply(Object obj) {
AppApiResponse appApiResponse = (AppApiResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(appApiResponse, "it");
return (ADResponse) appApiResponse.getData();
}
});
C7840.m6789(m7610, "AppApiService.api!!.fetc… it.data\n }");
c6889.mo2616(c8128.m7025(m7610).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
ADResponse aDResponse = (ADResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
List<SplashAD> splash = aDResponse.getSplash();
boolean z = splash == null || splash.isEmpty();
Objects.requireNonNull(mainActivityV2.f25741);
C1263 c12632 = C5078.f12260;
c12632.f3660.putBoolean("sp_key_is_show_splash_ad", Boolean.valueOf(!z).booleanValue());
c12632.f3660.apply();
if (!z) {
C5078 c50782 = mainActivityV2.f25741;
C7840.m6783(splash);
Integer valueOf3 = Integer.valueOf(splash.get(0).getDuring());
Objects.requireNonNull(c50782);
C1263 c12633 = C5078.f12260;
c12633.f3660.putInt("sp_key_count_down_time", valueOf3.intValue());
c12633.f3660.apply();
C5078 c50783 = mainActivityV2.f25741;
String href = splash.get(0).getHref();
Objects.requireNonNull(c50783);
C1263 c12634 = C5078.f12260;
c12634.f3660.putString("sp_key_splash_href", href);
c12634.f3660.apply();
C5078 c50784 = mainActivityV2.f25741;
String icon = splash.get(0).getIcon();
Objects.requireNonNull(c50784);
C1263 c12635 = C5078.f12260;
c12635.f3660.putString("sp_key_splash_img", icon);
c12635.f3660.apply();
}
List<ADModel> pop = aDResponse.getPop();
if (pop != null && !pop.isEmpty()) {
C5071 c5071 = C5071.f12239;
C5071.m4967(pop.get(0));
} else {
C5071 c50712 = C5071.f12239;
C5071.m4967(null);
}
List<ADModel> banner = aDResponse.getBanner();
if (banner != null && !banner.isEmpty()) {
C5071 c50713 = C5071.f12239;
C5071.m4965(banner);
} else {
C5071 c50714 = C5071.f12239;
C5071.m4965(null);
}
List<ADModel> nddBanner = aDResponse.getNddBanner();
if (nddBanner != null && !nddBanner.isEmpty()) {
C5071 c50715 = C5071.f12239;
C5071.m4966(nddBanner);
} else {
C5071 c50716 = C5071.f12239;
C5071.m4966(null);
}
List<ADModel> hkjBanner = aDResponse.getHkjBanner();
if (hkjBanner != null && !hkjBanner.isEmpty()) {
C5071 c50717 = C5071.f12239;
C5071.m4963(hkjBanner);
} else {
C5071 c50718 = C5071.f12239;
C5071.m4963(null);
}
List<AppAD> apps = aDResponse.getApps();
if (apps != null && !apps.isEmpty()) {
C5071 c50719 = C5071.f12239;
C5071.m4962(apps);
} else {
C5071 c507110 = C5071.f12239;
C5071.m4962(null);
}
C7380.m6385().m6394(new C4155());
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj) {
Throwable th = (Throwable) obj;
int i = MainActivityV2.f25729;
}
}));
C6889 c68892 = this.f25730;
InterfaceC8127 interfaceC81272 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC81272);
JSONObject m69952 = c8123.m6995();
m69952.put("all", 1);
m69952.put("kinds", new JSONArray((Collection) C9816.m8557(4, 1, 3)));
InterfaceC8716 m76102 = interfaceC81272.m7000(c8123.m6993(m69952)).m7610(new InterfaceC8709() {
@Override
public final Object apply(Object obj) {
AppApiResponse appApiResponse = (AppApiResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(appApiResponse, "it");
return (DomainResponse) appApiResponse.getData();
}
});
C7840.m6789(m76102, "AppApiService.api!!.fetc… it.data\n }");
c68892.mo2616(c8128.m7025(m76102).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
DomainResponse domainResponse = (DomainResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
C5078 c50782 = mainActivityV2.f25741;
C0418 c0418 = mainActivityV2.f25734;
List<Domain> api = domainResponse.getApi();
ArrayList arrayList = new ArrayList(C2176.m2261(api, 10));
for (Domain domain : api) {
arrayList.add(domain.getDomain());
}
String m774 = c0418.m774(arrayList);
Objects.requireNonNull(c50782);
C1263 c12632 = C5078.f12260;
c12632.f3660.putString("sp_key_domain_list", m774);
c12632.f3660.commit();
List<Domain> proxy = domainResponse.getProxy();
if (proxy != null) {
C5078 c50783 = mainActivityV2.f25741;
C0418 c04182 = mainActivityV2.f25734;
ArrayList arrayList2 = new ArrayList(C2176.m2261(proxy, 10));
for (Domain domain2 : proxy) {
arrayList2.add(domain2.getDomain());
}
String m7742 = c04182.m774(arrayList2);
Objects.requireNonNull(c50783);
C1263 c12633 = C5078.f12260;
c12633.f3660.putString("sp_key_proxy_domain_list", m7742);
c12633.f3660.commit();
}
C5078 c50784 = mainActivityV2.f25741;
C0418 c04183 = mainActivityV2.f25734;
List<Domain> navigate = domainResponse.getNavigate();
ArrayList arrayList3 = new ArrayList(C2176.m2261(navigate, 10));
for (Domain domain3 : navigate) {
arrayList3.add(domain3.getDomain());
}
String m7743 = c04183.m774(arrayList3);
Objects.requireNonNull(c50784);
C1263 c12634 = C5078.f12260;
c12634.f3660.putString("sp_key_guan_wang_domain_list", m7743);
c12634.f3660.commit();
List<Domain> imgSvc = domainResponse.getImgSvc();
if (imgSvc != null) {
C3434.m3610().f8371 = (C9816.m8552(imgSvc) >= 0 ? imgSvc.get(0) : new Domain("")).getDomain();
}
domainResponse.getExpiredRedirect();
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj) {
Throwable th = (Throwable) obj;
int i = MainActivityV2.f25729;
}
}));
m9839();
((NavTabLayout) m9842(R.id.bottomNavigation)).postDelayed(new Runnable() {
@Override
public final void run() {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
mainActivityV2.m9840();
}
}, 1000L);
if (bundle == null) {
C6889 c68893 = this.f25730;
Objects.requireNonNull(c8128);
InterfaceC8127 interfaceC81273 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC81273);
InterfaceC8716 m76103 = interfaceC81273.m7005(c8123.m6988()).m7610(new InterfaceC8709() {
@Override
public final Object apply(Object obj) {
AppApiResponse appApiResponse = (AppApiResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(appApiResponse, "it");
return (AppUpdateInfo) appApiResponse.getData();
}
});
C7840.m6789(m76103, "AppApiService.api!!.chec… it.data\n }");
c68893.mo2616(c8128.m7025(m76103).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj) {
String str;
MainActivityV2 mainActivityV2 = MainActivityV2.this;
AppUpdateInfo appUpdateInfo = (AppUpdateInfo) obj;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
List m2978 = C2880.m2978(appUpdateInfo.getLastVer(), new String[]{"."}, false, 0, 6);
try {
AbstractApplicationC7572 abstractApplicationC7572 = AbstractApplicationC7572.f16868;
str = abstractApplicationC7572.getPackageManager().getPackageInfo(abstractApplicationC7572.getPackageName(), 0).versionName;
} catch (Exception e) {
e.printStackTrace();
str = "0.0";
}
C7840.m6789(str, "getVersion()");
List m29782 = C2880.m2978(str, new String[]{"."}, false, 0, 6);
if (C7840.m6782(m2978.get(0), m29782.get(0)) && C7840.m6782(m2978.get(1), m29782.get(1))) {
return;
}
C7840.m6789(appUpdateInfo, "it");
C7840.m6785(appUpdateInfo, "appUpdateInfo");
C5877 c5877 = new C5877();
Bundle bundle2 = new Bundle();
bundle2.putParcelable("key_activity_param_1", appUpdateInfo);
c5877.m2384(bundle2);
c5877.m2571(mainActivityV2.m2466(), "update_dialog");
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj) {
Throwable th = (Throwable) obj;
int i = MainActivityV2.f25729;
}
}));
C5071 c5071 = C5071.f12239;
Objects.requireNonNull(C5071.f12242);
ADModel aDModel = (ADModel) C5558.m5265(C5078.f12260.f3658.getString("sp_pop_ad", ""), ADModel.class);
if (aDModel != null) {
String icon = aDModel.getIcon();
String href = aDModel.getHref();
C7840.m6785(icon, "imgUrl");
C7840.m6785(href, "actionUrl");
C4296 c4296 = new C4296();
Bundle bundle2 = new Bundle();
bundle2.putString("key_activity_param_1", icon);
bundle2.putString("key_activity_param_2", href);
c4296.m2384(bundle2);
c4296.m2571(m2466(), "hot_ad_dialog");
}
}
C0548 c0548 = new C0548(new Runnable() {
@Override
public final void run() {
File[] listFiles;
MainActivityV2 mainActivityV2 = MainActivityV2.this;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
File externalCacheDir = AbstractApplicationC7572.f16868.getExternalCacheDir();
if (externalCacheDir == null || !externalCacheDir.exists() || (listFiles = externalCacheDir.listFiles(new FileFilter() {
@Override
public final boolean accept(File file) {
int i2 = MainActivityV2.f25729;
return System.currentTimeMillis() - file.lastModified() > TimeUnit.DAYS.toMillis(30L);
}
})) == null) {
return;
}
int i2 = 0;
int length = listFiles.length;
while (i2 < length) {
File file = listFiles[i2];
i2++;
String str = mainActivityV2.f25733;
StringBuilder m8071 = C9125.m8071("file ");
m8071.append((Object) file.getName());
m8071.append(" need del");
Log.d(str, m8071.toString());
file.delete();
}
}
});
AbstractC8720 abstractC8720 = C10606.f23730;
c0548.m7591(abstractC8720).m7589(abstractC8720).m7590(new C3001());
C6889 c68894 = this.f25730;
Objects.requireNonNull(c8128);
InterfaceC8127 interfaceC81274 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC81274);
JSONObject m69953 = c8123.m6995();
m69953.put("filename", "categoryhot.json");
InterfaceC8716 m76104 = interfaceC81274.m7008(c8123.m6993(m69953)).m7610(new InterfaceC8709() {
@Override
public final Object apply(Object obj) {
AppApiResponse appApiResponse = (AppApiResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(appApiResponse, "it");
return (Videosource) appApiResponse.getData();
}
});
C7840.m6789(m76104, "AppApiService.api!!\n …it.data\n }");
c68894.mo2616(c8128.m7025(m76104).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj) {
Videosource videosource = (Videosource) obj;
int i = MainActivityV2.f25729;
if (!C7840.m6782(videosource.vip_tips, "")) {
Objects.requireNonNull(C3434.m3610());
}
if (!C7840.m6782(videosource.sg_global_search_url, "")) {
C3434.m3610().f8358 = videosource.sg_global_search_url;
}
if (!C7840.m6782(videosource.self_global_search_url, "")) {
Objects.requireNonNull(C3434.m3610());
}
C7840.m6789(videosource, "data");
C5515.m5245(videosource);
C9466 c9466 = C9466.f21320;
C9466.m8321().m8323();
C1948 c1948 = C1948.f5133;
C1948.m2068();
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj) {
Throwable th = (Throwable) obj;
int i = MainActivityV2.f25729;
}
}));
AnalyticsHandler.INSTANCE.logScreen("main");
return;
}
C7840.m6788("pageAdapter");
throw null;
}
C7840.m6788("pageAdapter");
throw null;
}
@Override
public void onDestroy() {
this.f25730.mo795();
C7380.m6385().m6392(this);
super.onDestroy();
}
@InterfaceC7378(threadMode = ThreadMode.MAIN)
public final void onReceiveRefreshVIPEvent(C4156 c4156) {
C7840.m6785(c4156, "event");
m9840();
}
@Override
public void onResume() {
super.onResume();
if (this.f25737 == this.f25740.f8356) {
m9839();
}
this.f25737++;
}
@Override
public void mo7409() {
C8775 c8775 = this.f25732;
if (c8775 != null) {
c8775.m7668();
} else {
C7840.m6788("loadingDialogFragment");
throw null;
}
}
public final void m9839() {
C6889 c6889 = this.f25730;
InterfaceC8127.C8128 c8128 = InterfaceC8127.f18011;
Objects.requireNonNull(c8128);
InterfaceC8127 interfaceC8127 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC8127);
InterfaceC8716 m7610 = interfaceC8127.m7015(C8123.f18004.m6988()).m7610(new InterfaceC8709() {
@Override
public final Object apply(Object obj) {
AppApiResponse appApiResponse = (AppApiResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(appApiResponse, "it");
return (ReportResponse) appApiResponse.getData();
}
});
C7840.m6789(m7610, "AppApiService.api!!.repo… it.data\n }");
c6889.mo2616(c8128.m7025(m7610).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
ReportResponse reportResponse = (ReportResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
mainActivityV2.f25740.f8356 = reportResponse.getSwitchTimes();
mainActivityV2.f25740.f8370 = reportResponse.getInviteBanner();
mainActivityV2.f25740.f8359 = reportResponse.getInviteUrl();
C3434 c3434 = mainActivityV2.f25740;
int ifNeedReportVideo = reportResponse.getIfNeedReportVideo();
c3434.f8365 = reportResponse.getVideoReportUrl();
c3434.f8368 = ifNeedReportVideo;
Integer scrollWithAdvert = reportResponse.getScrollWithAdvert();
if (scrollWithAdvert != null) {
scrollWithAdvert.intValue();
mainActivityV2.f25740.f8366 = reportResponse.getScrollWithAdvert().intValue();
}
String expired_redirect_url = reportResponse.getExpired_redirect_url();
if (expired_redirect_url != null) {
mainActivityV2.f25740.f8373 = expired_redirect_url;
}
String businessUrl = reportResponse.getBusinessUrl();
if (businessUrl != null) {
mainActivityV2.f25740.f8362 = businessUrl;
}
C5076 c5076 = mainActivityV2.f25739;
int expired = reportResponse.getExpired();
c5076.f12253 = expired;
if (c5076.f12256 == -1) {
C5078 m4982 = C5078.m4982();
Integer valueOf = Integer.valueOf(expired);
Objects.requireNonNull(m4982);
C1263 c1263 = C5078.f12260;
c1263.f3660.putInt("sp_key_expired_time_v2", valueOf.intValue());
c1263.f3660.commit();
}
C5078 m49822 = C5078.m4982();
int regAward = reportResponse.getRegAward();
Objects.requireNonNull(m49822);
C1263 c12632 = C5078.f12260;
c12632.f3660.putInt("sp_key_reward_time", regAward);
c12632.f3660.apply();
List<NeedCheckDomainModel> checkDomain = reportResponse.getCheckDomain();
if (checkDomain != null && (!checkDomain.isEmpty())) {
DomainHealthReport.INSTANCE.doCheckAndReportDomainHealth(checkDomain);
}
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj) {
Throwable th = (Throwable) obj;
int i = MainActivityV2.f25729;
}
}));
}
public final void m9840() {
Account m4977 = C5076.m4968().m4977();
if (m4977 == null || C7840.m6782(m4977.userName, "") || C7840.m6782(m4977.password, "")) {
return;
}
C6889 c6889 = this.f25730;
InterfaceC8127.C8128 c8128 = InterfaceC8127.f18011;
Objects.requireNonNull(c8128);
InterfaceC8127 interfaceC8127 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC8127);
C8123 c8123 = C8123.f18004;
String str = m4977.userName;
C7840.m6789(str, "savedAccount.userName");
String str2 = m4977.password;
C7840.m6789(str2, "savedAccount.password");
c6889.mo2616(c8128.m7025(interfaceC8127.m7001(c8123.m6992(str, str2, true))).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
AppApiResponse appApiResponse = (AppApiResponse) obj;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
if (appApiResponse.getCode() != 200) {
Log.d(mainActivityV2.f25733, "auto login failed ");
return;
}
C5076.m4968().m4971((AccountV2Response) appApiResponse.getData());
C6889 c68892 = mainActivityV2.f25730;
InterfaceC8127.C8128 c81282 = InterfaceC8127.f18011;
Objects.requireNonNull(c81282);
InterfaceC8127 interfaceC81272 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC81272);
InterfaceC8716 m7610 = interfaceC81272.m7024(C8123.f18004.m6988()).m7610(new InterfaceC8709() {
@Override
public final Object apply(Object obj2) {
AppApiResponse appApiResponse2 = (AppApiResponse) obj2;
int i2 = MainActivityV2.f25729;
C7840.m6785(appApiResponse2, "it");
return (List) appApiResponse2.getData();
}
});
C7840.m6789(m7610, "AppApiService.api!!\n … .map { it.data }");
c68892.mo2616(c81282.m7025(m7610).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj2) {
List list = (List) obj2;
int i2 = MainActivityV2.f25729;
C7840.m6789(list, "it");
if (!(!list.isEmpty()) || list.size() <= 10) {
return;
}
C1158.f3347.clear();
List<String> list2 = C1158.f3347;
ArrayList arrayList = new ArrayList();
for (Object obj3 : list) {
if (((String) obj3).length() > 0) {
arrayList.add(obj3);
}
}
ArrayList arrayList2 = new ArrayList(C2176.m2261(arrayList, 10));
Iterator it = arrayList.iterator();
while (it.hasNext()) {
arrayList2.add(URLEncoder.encode((String) it.next()));
}
list2.addAll(arrayList2);
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj2) {
Throwable th = (Throwable) obj2;
int i2 = MainActivityV2.f25729;
}
}));
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
Throwable th = (Throwable) obj;
int i = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
Log.d(mainActivityV2.f25733, "auto login failed");
}
}));
}
@Override
public void mo7410() {
C8775 c8775 = this.f25732;
if (c8775 != null) {
c8775.m7667();
} else {
C7840.m6788("loadingDialogFragment");
throw null;
}
}
@Override
public void mo7411(final int i) {
C8775 c8775 = this.f25732;
if (c8775 != null) {
c8775.m7668();
C6889 c6889 = this.f25730;
InterfaceC8127.C8128 c8128 = InterfaceC8127.f18011;
Objects.requireNonNull(c8128);
InterfaceC8127 interfaceC8127 = InterfaceC8127.C8128.f18014;
C7840.m6783(interfaceC8127);
AbstractC8726 m7610 = C7315.m6354(interfaceC8127, null, 1, null).m7610(new InterfaceC8709() {
@Override
public final Object apply(Object obj) {
AppApiResponse appApiResponse = (AppApiResponse) obj;
int i2 = MainActivityV2.f25729;
C7840.m6785(appApiResponse, "it");
ArrayList arrayList = new ArrayList();
for (Object obj2 : (Iterable) appApiResponse.getData()) {
boolean z = false;
try {
z = EnumC6526.m5899(((GlobalSearchPlatform) obj2).getId()).m5900();
} catch (Exception unused) {
}
if (z) {
arrayList.add(obj2);
}
}
return arrayList;
}
});
C7840.m6789(m7610, "AppApiService.api!!.fetc… }\n }");
c6889.mo2616(c8128.m7025(m7610).m7607(new InterfaceC8706() {
@Override
public final void accept(Object obj) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
int i2 = i;
List list = (List) obj;
int i3 = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
if (list.isEmpty()) {
mainActivityV2.m9841();
return;
}
mainActivityV2.f25731.clear();
List<GlobalSearchPlatform> list2 = mainActivityV2.f25731;
C7840.m6789(list, "it");
list2.addAll(list);
mainActivityV2.mo7410();
C7840.m6785(mainActivityV2, "activity");
Intent intent = new Intent(mainActivityV2, GlobalSearchLaunchActivity.class);
intent.putExtra("key_activity_param_1", i2);
mainActivityV2.startActivity(intent);
}
}, new InterfaceC8706() {
@Override
public final void accept(Object obj) {
MainActivityV2 mainActivityV2 = MainActivityV2.this;
Throwable th = (Throwable) obj;
int i2 = MainActivityV2.f25729;
C7840.m6785(mainActivityV2, "this$0");
mainActivityV2.m9841();
}
}));
return;
}
C7840.m6788("loadingDialogFragment");
throw null;
}
public final void m9841() {
mo7410();
C8777 c8777 = new C8777(this);
String m1425 = C1350.m1425(R.string.go_to_charge);
C7840.m6789(m1425, "getString(R.string.go_to_charge)");
c8777.m7664(m1425);
String m14252 = C1350.m1425(R.string.zhi_dao_le);
C7840.m6789(m14252, "getString(R.string.zhi_dao_le)");
c8777.m7663(m14252);
c8777.m7671(false);
C8777 c87772 = c8777;
C11087 c11087 = new C11087();
TextView textView = c87772.f19589;
C7840.m6783(textView);
textView.setOnClickListener(new View$OnClickListenerC8779(c11087, c87772));
C11088 c11088 = new C11088();
TextView textView2 = c87772.f19590;
C7840.m6783(textView2);
textView2.setOnClickListener(new View$OnClickListenerC8776(c11088, c87772));
c87772.m7674(R.string.hei_ke_ji_alert_dialog_title);
c87772.m7669(R.string.yong_jiu_vip_tip1);
c8777.m7668();
}
@Override
public List<GlobalSearchPlatform> mo7384() {
return this.f25731;
}
public View m9842(int i) {
Map<Integer, View> map = this.f25738;
View view = map.get(Integer.valueOf(i));
if (view == null) {
View mo6232 = m6291().mo6232(i);
if (mo6232 == null) {
return null;
}
map.put(Integer.valueOf(i), mo6232);
return mo6232;
}
return view;
}
}