正在查看: Easycash v3.75.13 应用的 LaunchActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Easycash v3.75.13 应用的 LaunchActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.fintopia.lender.module.launch;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Group;
import butterknife.BindView;
import com.fintopia.lender.R;
import com.fintopia.lender.module.baseui.LenderCommonActivity;
import com.fintopia.lender.module.events.EventOpenLender;
import com.fintopia.lender.module.launch.LaunchActivity;
import com.fintopia.lender.module.launch.SplashConfigHelper;
import com.fintopia.lender.module.launch.model.LenderConfigKey;
import com.fintopia.lender.module.maintab.MainActivity;
import com.fintopia.lender.module.network.ILenderApiRoutes;
import com.fintopia.lender.module.utils.AppResourceReportUtils;
import com.fintopia.lender.module.utils.SensorTrackEvent;
import com.fintopia.lender.module.utils.SensorTrackEventUtil;
import com.lingyue.idnbaselib.configmanager.ConfigManagerHolder;
import com.lingyue.idnbaselib.framework.lifecycle.LifecycleEvent;
import com.lingyue.idnbaselib.framework.lifecycle.m;
import com.lingyue.idnbaselib.model.AppResource;
import com.lingyue.idnbaselib.model.AppResourceReportPageType;
import com.lingyue.idnbaselib.model.IdnObserver;
import com.lingyue.idnbaselib.model.PageConfigResponse;
import com.lingyue.idnbaselib.model.SdkType;
import com.lingyue.supertoolkit.customtools.CollectionUtils;
import com.lingyue.supertoolkit.phonetools.AdaptScreenUtil;
import com.veda.android.bananalibrary.infrastructure.BaseActivity;
import io.reactivex.disposables.Disposable;
import java.util.ArrayList;
import java.util.Arrays;
import org.greenrobot.eventbus.EventBus;
public class LaunchActivity extends LenderCommonActivity {
@BindView(4778)
ConstraintLayout clParent;
@BindView(4947)
Group gpSplash;
@BindView(5063)
ImageView ivSplash;
@BindView(5861)
TextView tvSkip;
@NonNull
private SplashConfigHelper f62u;
private boolean f63v;
private Runnable f64w;
private boolean f65x;
private boolean y;
class AnonymousClass2 implements SplashConfigHelper.Delegate {
AnonymousClass2() {
}
public void f(String str) {
LaunchActivity.this.X(str);
}
@Override
public void a(@NonNull final String str) {
LaunchActivity.this.Y(new Runnable() {
@Override
public final void run() {
LaunchActivity.AnonymousClass2.this.f(str);
}
}, true);
}
@Override
public void b() {
final LaunchActivity launchActivity = LaunchActivity.this;
launchActivity.Y(new Runnable() {
@Override
public final void run() {
LaunchActivity.P(LaunchActivity.this);
}
}, true);
}
}
public static void P(LaunchActivity launchActivity) {
launchActivity.W();
}
public void T() {
Runnable runnable;
if (this.f65x && this.y && (runnable = this.f64w) != null) {
this.clParent.removeCallbacks(runnable);
this.clParent.post(this.f64w);
}
}
public void U() {
if (!this.f62u.j()) {
Y(new Runnable() {
@Override
public final void run() {
LaunchActivity.this.W();
}
}, false);
return;
}
this.gpSplash.setVisibility(0);
AppResourceReportUtils.a(this, Arrays.asList(new AppResource(AppResourceReportPageType.SPLASH_PAGE.name(), (String) null, this.f62u.i().id)));
this.f62u.g(this.ivSplash, this.tvSkip, new AnonymousClass2());
SensorTrackEventUtil.b(this, null, SensorTrackEvent.LENDER_OPEN_SCREEN_PAGE_SHOW, this.f62u.i().id);
}
private void V() {
this.f63v = false;
this.f64w = null;
SplashConfigHelper splashConfigHelper = new SplashConfigHelper(this);
this.f62u = splashConfigHelper;
splashConfigHelper.h(new Runnable() {
@Override
public final void run() {
LaunchActivity.this.U();
}
});
}
public void W() {
EventBus.c().n(new EventOpenLender());
startActivity(MainActivity.IntentBuilder.e(this).b(b0()).a());
finish();
}
public void X(String str) {
EventBus.c().n(new EventOpenLender());
jumpToWebPage(str);
finish();
}
public void Y(@NonNull Runnable runnable, boolean z) {
if (this.f63v) {
return;
}
this.f63v = true;
if (z) {
runnable.run();
} else {
this.f64w = runnable;
T();
}
}
public void Z() {
this.f65x = true;
T();
}
private void a0() {
this.f65x = false;
if (this.userSession.e()) {
new RefreshUserTokenHelper(this).c(new Runnable() {
@Override
public final void run() {
LaunchActivity.this.Z();
}
});
} else {
this.f65x = true;
T();
}
}
private String b0() {
return getIntent().getStringExtra("redirect_url");
}
public void c0(String str, String str2) {
AppGeneralConfigUtils.o().u(str, str2);
}
private void fetchOperateTabConfig() {
this.y = false;
ArrayList arrayList = new ArrayList();
arrayList.add(SdkType.IDN_FIN.name());
((ILenderApiRoutes) this.apiHelper.a()).F(arrayList).a(new IdnObserver<PageConfigResponse>(this) {
public void onError(Throwable th, PageConfigResponse pageConfigResponse) {
super.onError(th, pageConfigResponse);
LaunchActivity.this.y = true;
LaunchActivity.this.T();
}
public void onSuccess(PageConfigResponse pageConfigResponse) {
if (CollectionUtils.f(pageConfigResponse.body.bottomTabList)) {
AppGeneralConfigUtils.o().t(LenderConfigKey.FIN_TAB_OPERATION);
} else {
LaunchActivity launchActivity = LaunchActivity.this;
launchActivity.c0(LenderConfigKey.FIN_TAB_OPERATION, ((BaseActivity) launchActivity).gson.t(pageConfigResponse.body.bottomTabList.get(0)));
}
LaunchActivity.this.y = true;
LaunchActivity.this.T();
}
});
}
public static void startLaunchActivity(Activity activity, String str) {
Intent intent = new Intent(activity, (Class<?>) LaunchActivity.class);
intent.addFlags(603979776);
intent.putExtra("redirect_url", str);
activity.startActivity(intent);
}
@Override
public int getLayoutID() {
return R.layout.lender_layout_activity_launch;
}
@Override
public Resources getResources() {
Resources resources = super.getResources();
AdaptScreenUtil.c(resources);
return resources;
}
public void onBackPressed() {
finish();
}
@Override
protected void onCreate(@Nullable Bundle bundle) {
overridePendingTransition(R.anim.anim_fade_in, R.anim.anim_fade_out);
ConfigManagerHolder.c().d(LenderConfigManager.f());
super.onCreate(bundle);
}
@Override
protected void onDestroy() {
this.f62u.f();
super.onDestroy();
}
@Override
public Disposable runOnActiveEvent(Runnable runnable) {
return m.a(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnCreated(@NonNull Runnable runnable) {
return m.b(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnDestroy(@NonNull Runnable runnable) {
return m.c(this, runnable);
}
@Override
@SuppressLint({"CheckResult"})
public Disposable runOnEvent(@NonNull LifecycleEvent lifecycleEvent, @Nullable Runnable runnable) {
return m.d(this, lifecycleEvent, runnable);
}
@Override
public Disposable runOnEvents(@NonNull LifecycleEvent[] lifecycleEventArr, @Nullable Runnable runnable) {
return m.e(this, lifecycleEventArr, runnable);
}
@Override
protected void w() {
super.w();
V();
a0();
fetchOperateTabConfig();
}
}