VMOS Pro v2.9.9版本的 MD5 值为:42f292af86d02c1a08555cf2d3982a52
以下内容为反编译后的 SplashActivity.java 源代码,内容仅作参考
package com.vmos.pro.activities.splash;
import android.content.Intent;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
import com.blankj.utilcode.util.C0974;
import com.tencent.mars.xlog.Log;
import com.tencent.mmkv.MMKV;
import com.umeng.analytics.pro.bg;
import com.vmos.commonuilibrary.C1414;
import com.vmos.commonuilibrary.View$OnClickListenerC1398;
import com.vmos.commonuilibrary.View$OnClickListenerC1406;
import com.vmos.core.utils.ScreenUtil;
import com.vmos.mvplibrary.BaseAct;
import com.vmos.pro.R;
import com.vmos.pro.account.AccountHelper;
import com.vmos.pro.activities.deepguide.DeepGuideActivity;
import com.vmos.pro.activities.main.MainActivity;
import com.vmos.pro.activities.renderer.FloatPermissionHelper;
import com.vmos.pro.activities.renderer.StartRendererActCallback;
import com.vmos.pro.activities.splash.SplashActivity;
import com.vmos.pro.activities.splash.SplashContract;
import com.vmos.pro.activities.splash.dialog.RequestFloatPermissionDialog;
import com.vmos.pro.activities.vip.JoinVipPaymentActivity;
import com.vmos.pro.bean.apkupdate.UpdateBean;
import com.vmos.pro.bean.rec.GuestOsInfo;
import com.vmos.pro.bean.rec.LocalRomBean;
import com.vmos.pro.ui.protocol.WebViewActivity;
import com.vmos.pro.utils.TrackUtils;
import defpackage.ho1;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.schedulers.Schedulers;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u0000\u008e\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\t\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\r\n\u0002\b\u0007\u0018\u0000 R2\n\u0012\u0006\u0012\u0004\u0018\u00010\u00020\u00012\u00020\u00032\u00020\u00042\u00020\u0005:\u0001RB\u0007¢\u0006\u0004\bP\u0010QJ\b\u0010\u0007\u001a\u00020\u0006H\u0002J\b\u0010\b\u001a\u00020\u0006H\u0002J\b\u0010\t\u001a\u00020\u0006H\u0002J\b\u0010\n\u001a\u00020\u0006H\u0002J\b\u0010\u000b\u001a\u00020\u0006H\u0002J\u0010\u0010\u000b\u001a\u00020\u00062\u0006\u0010\r\u001a\u00020\fH\u0002J\b\u0010\u000e\u001a\u00020\u0006H\u0002J\b\u0010\u000f\u001a\u00020\u0006H\u0002J\b\u0010\u0010\u001a\u00020\u0006H\u0002J\u0014\u0010\u0013\u001a\u00020\u00062\n\b\u0002\u0010\u0012\u001a\u0004\u0018\u00010\u0011H\u0002J\b\u0010\u0014\u001a\u00020\u0002H\u0014J\u0012\u0010\u0017\u001a\u00020\u00062\b\u0010\u0016\u001a\u0004\u0018\u00010\u0015H\u0014J\b\u0010\u0018\u001a\u00020\u0006H\u0014J\b\u0010\u0019\u001a\u00020\u0006H\u0016J\b\u0010\u001a\u001a\u00020\u0006H\u0016J\b\u0010\u001b\u001a\u00020\u0006H\u0014J\b\u0010\u001c\u001a\u00020\u0006H\u0014J\b\u0010\u001d\u001a\u00020\u0006H\u0016J\u0010\u0010 \u001a\u00020\u00062\u0006\u0010\u001f\u001a\u00020\u001eH\u0016J\b\u0010\"\u001a\u00020!H\u0014J\u0010\u0010%\u001a\u00020\u00062\u0006\u0010$\u001a\u00020#H\u0016J\b\u0010&\u001a\u00020\u0006H\u0016J\u0010\u0010'\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u0011H\u0016J\u0018\u0010*\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u00112\u0006\u0010)\u001a\u00020(H\u0016J\u0010\u0010+\u001a\u00020\u00062\u0006\u0010)\u001a\u00020(H\u0016J\u0010\u0010.\u001a\u00020\u00062\u0006\u0010-\u001a\u00020,H\u0016J\b\u0010/\u001a\u00020\u0006H\u0016R\u0014\u00101\u001a\u0002008\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b1\u00102R\u0018\u00104\u001a\u0004\u0018\u0001038\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b4\u00105R\u0018\u00107\u001a\u0004\u0018\u0001068\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b7\u00108R\u0016\u00109\u001a\u00020,8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b9\u0010:R\u0016\u0010%\u001a\u00020,8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b%\u0010:R\u0016\u0010;\u001a\u00020,8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b;\u0010:R\u0016\u0010=\u001a\u00020<8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b=\u0010>R\u0016\u0010?\u001a\u00020!8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b?\u0010@R\u0016\u0010A\u001a\u00020!8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bA\u0010@R\u0016\u0010\u001d\u001a\u00020,8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001d\u0010:R\u0016\u0010B\u001a\u00020,8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bB\u0010:R\u0018\u0010$\u001a\u0004\u0018\u00010#8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b$\u0010CR\u0016\u0010D\u001a\u00020,8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bD\u0010:R\u0014\u0010F\u001a\u00020E8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bF\u0010GR\u0016\u0010H\u001a\u00020,8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bH\u0010:R\u0014\u0010K\u001a\u00020\u00068BX\u0082\u0004¢\u0006\u0006\u001a\u0004\bI\u0010JR\u0014\u0010O\u001a\u00020L8BX\u0082\u0004¢\u0006\u0006\u001a\u0004\bM\u0010N¨\u0006S"}, d2 = {"Lcom/vmos/pro/activities/splash/SplashActivity;", "Lcom/vmos/mvplibrary/BaseAct;", "Lcom/vmos/pro/activities/splash/SplashContract$Presenter;", "Lcom/vmos/pro/activities/splash/SplashContract$View;", "Landroid/view/View$OnClickListener;", "Lcom/vmos/commonuilibrary/ٴ$י;", "Lj66;", "fetchSplashAD", "countdownAdTime", "showProtocol", "checkFloatBallPermission", "startToMain", "Landroid/content/Intent;", "intent", "finishByNoAnima", "startToDeepGuide", "showUpdateDialog", "Landroid/view/View;", bg.aE, "startLocalRom", "createPresenter", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "setUp", "doSetUp", "onAdPresent", "onResume", "onPause", "adWorkDone", "", "pictureUrl", "loadAd", "", "getLayoutId", "Lcom/vmos/pro/bean/apkupdate/UpdateBean$App$UpdateDetail;", "updateDetail", "hasUpdate", "noUpdate", "onClick", "Lcom/vmos/commonuilibrary/ٴ;", "dialog", "onViewClick", "onFileDownloadSuccess", "", "hasFocus", "onWindowFocusChanged", "onAttachedToWindow", "Landroid/os/Handler;", "handler", "Landroid/os/Handler;", "Landroid/widget/FrameLayout;", "adContainer", "Landroid/widget/FrameLayout;", "Landroid/widget/TextView;", "tvSkipAd", "Landroid/widget/TextView;", "hasAssetRom", "Z", "countingAdTime", "", "startCountTime", "J", "countedTime", "I", "adCountdown", "started", "Lcom/vmos/pro/bean/apkupdate/UpdateBean$App$UpdateDetail;", "checkedUpdate", "Ljava/lang/Runnable;", "adCallback", "Ljava/lang/Runnable;", "requestFloatPermission", "getGpuInfo", "()Lj66;", "gpuInfo", "", "getProtocolContent", "()Ljava/lang/CharSequence;", "protocolContent", "<init>", "()V", "Companion", "app_release"}, k = 1, mv = {1, 7, 1})
public final class SplashActivity extends BaseAct<SplashContract.Presenter> implements SplashContract.View, View.OnClickListener, View$OnClickListenerC1398.InterfaceC1401 {
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
private static final String TAG = "SPLASH_SplashActivity";
@Nullable
private FrameLayout adContainer;
private boolean adWorkDone;
private boolean checkedUpdate;
private int countedTime;
private boolean countingAdTime;
private boolean hasAssetRom;
private boolean hasUpdate;
private boolean requestFloatPermission;
private long startCountTime;
private boolean started;
@Nullable
private TextView tvSkipAd;
@Nullable
private UpdateBean.App.UpdateDetail updateDetail;
@NotNull
private final Handler handler = new Handler(Looper.getMainLooper());
private int adCountdown = 3;
@NotNull
private final Runnable adCallback = new Runnable() {
@Override
public final void run() {
SplashActivity.m10687adCallback$lambda0(SplashActivity.this);
}
};
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lcom/vmos/pro/activities/splash/SplashActivity$Companion;", "", "()V", "TAG", "", "app_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public static final class Companion {
private Companion() {
}
public Companion(ce0 ce0Var) {
this();
}
}
public static final void m10687adCallback$lambda0(SplashActivity splashActivity) {
y82.m51531(splashActivity, "this$0");
splashActivity.countdownAdTime();
}
public final void checkFloatBallPermission() {
if (!FloatPermissionHelper.hasfloatPermission()) {
RequestFloatPermissionDialog newInstance = RequestFloatPermissionDialog.Companion.newInstance();
FragmentManager supportFragmentManager = getSupportFragmentManager();
y82.m51530(supportFragmentManager, "supportFragmentManager");
newInstance.showDialog(supportFragmentManager);
newInstance.setOnDialogListener(new RequestFloatPermissionDialog.OnDialogListener() {
@Override
public void onDialogNegativeClick(@NotNull DialogFragment dialogFragment) {
boolean z;
y82.m51531(dialogFragment, "dialog");
dc6.f13598.m16936().encode(w14.f38899, false);
z = SplashActivity.this.hasAssetRom;
if (z) {
SplashActivity.this.startLocalRom(dialogFragment.getView());
} else {
SplashActivity.this.startToDeepGuide();
}
}
@Override
@RequiresApi(23)
public void onDialogPositiveClick(@NotNull DialogFragment dialogFragment) {
boolean z;
y82.m51531(dialogFragment, "dialog");
if (FloatPermissionHelper.hasfloatPermission()) {
z = SplashActivity.this.hasAssetRom;
if (z) {
SplashActivity.this.startLocalRom(dialogFragment.getView());
return;
} else {
SplashActivity.this.startToDeepGuide();
return;
}
}
FloatPermissionHelper.getInstance().request(SplashActivity.this);
SplashActivity.this.requestFloatPermission = true;
}
});
} else if (this.hasAssetRom) {
startLocalRom$default(this, null, 1, null);
} else {
startToDeepGuide();
}
}
private final void countdownAdTime() {
Log.i(TAG, "countdownAdTime :" + this.adCountdown);
int i = this.adCountdown;
if (i <= 0) {
adWorkDone();
cg6.m5095(this.tvSkipAd, false);
return;
}
this.adCountdown = i - 1;
TextView textView = this.tvSkipAd;
y82.m51521(textView);
textView.setText(getString(R.string.splash_1, new Object[]{Integer.valueOf(this.adCountdown)}));
this.countingAdTime = true;
this.startCountTime = SystemClock.uptimeMillis();
this.handler.postDelayed(this.adCallback, 1000L);
}
private final void fetchSplashAD() {
TextView textView = this.tvSkipAd;
if (textView != null) {
textView.setOnClickListener(this);
}
P p = this.mPresenter;
y82.m51521(p);
((SplashContract.Presenter) p).requestSplashAdConfig();
}
private static final void m10688fetchSplashAD$lambda1(SplashActivity splashActivity) {
y82.m51531(splashActivity, "this$0");
P p = splashActivity.mPresenter;
y82.m51521(p);
((SplashContract.Presenter) p).requestSplashAdConfig();
}
public final void finishByNoAnima() {
finish();
overridePendingTransition(0, 0);
}
private final j66 getGpuInfo() {
if (TextUtils.isEmpty(dc6.f13598.m16936().decodeString("GPU_RENDERER", ""))) {
GLSurfaceView gLSurfaceView = new GLSurfaceView(this);
gLSurfaceView.setRenderer(new SplashActivity$gpuInfo$1(this, gLSurfaceView));
View findViewById = findViewById(16908290);
y82.m51523(findViewById, "null cannot be cast to non-null type android.view.ViewGroup");
((ViewGroup) findViewById).addView(gLSurfaceView);
}
return j66.f21418;
}
private final CharSequence getProtocolContent() {
String m3636 = bm4.m3636(R.string.dialog_user_protocol_str);
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
spannableStringBuilder.append((CharSequence) m3636);
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
public void onClick(@NotNull View view) {
y82.m51531(view, "widget");
SplashActivity.this.startActivity(new Intent(SplashActivity.this, WebViewActivity.class).putExtra("title", SplashActivity.this.getString(R.string.splash_3)).putExtra("url", "http://www.vmos.cn/news/202006031545.htm"));
}
@Override
public void updateDrawState(@NotNull TextPaint textPaint) {
y82.m51531(textPaint, "ds");
textPaint.setUnderlineText(false);
}
};
ClickableSpan clickableSpan2 = new ClickableSpan() {
@Override
public void onClick(@NotNull View view) {
y82.m51531(view, "widget");
SplashActivity.this.startActivity(new Intent(SplashActivity.this, WebViewActivity.class).putExtra("title", SplashActivity.this.getString(R.string.splash_4)).putExtra("url", "http://www.vmos.cn/news/202006121526.htm"));
}
@Override
public void updateDrawState(@NotNull TextPaint textPaint) {
y82.m51531(textPaint, "ds");
textPaint.setUnderlineText(false);
}
};
y82.m51530(m3636, "text");
String string = getString(R.string.dialog_user_protocol_str_user_agreement);
y82.m51530(string, "getString(R.string.dialo…tocol_str_user_agreement)");
int m47371 = vp5.m47371(m3636, string, 0, false, 6, null);
int length = m47371 + getString(R.string.dialog_user_protocol_str_user_agreement).length();
String string2 = getString(R.string.dialog_user_protocol_str_privacy_policy);
y82.m51530(string2, "getString(R.string.dialo…tocol_str_privacy_policy)");
int m47385 = vp5.m47385(m3636, string2, 0, false, 6, null);
int length2 = m47385 + getString(R.string.dialog_user_protocol_str_privacy_policy).length();
vp5.m47371(m3636, "User Agreement", 0, false, 6, null);
vp5.m47385(m3636, "User Agreement", 0, false, 6, null);
spannableStringBuilder.setSpan(clickableSpan, m47371, length, 33);
spannableStringBuilder.setSpan(clickableSpan2, m47385, length2, 33);
spannableStringBuilder.setSpan(new ForegroundColorSpan(bm4.m3643(R.color.common_pro_blue)), m47371, length, 33);
spannableStringBuilder.setSpan(new ForegroundColorSpan(bm4.m3643(R.color.common_pro_blue)), m47385, length2, 33);
return spannableStringBuilder;
}
private final void showProtocol() {
View$OnClickListenerC1406 m8754 = View$OnClickListenerC1406.m8743(findViewById(16908290)).m8754(getString(R.string.splash_2), 14);
m8754.f5933.setTypeface(Typeface.defaultFromStyle(1));
m8754.f5934.setMovementMethod(LinkMovementMethod.getInstance());
m8754.m8756(R.mipmap.img_common_dialog_protocol).m8762(getProtocolContent(), 12).m8746(getString(R.string.dialog_user_protocol_cancel), getString(R.string.dialog_user_protocol_agree), new View$OnClickListenerC1406.AbstractC1408() {
@Override
public void onNegativeBtnClick(@NotNull View$OnClickListenerC1406 view$OnClickListenerC1406) {
y82.m51531(view$OnClickListenerC1406, "dialog");
SplashActivity.this.finishByNoAnima();
}
@Override
public void onPositiveBtnClick(@NotNull View$OnClickListenerC1406 view$OnClickListenerC1406) {
AbstractC6973 abstractC6973;
AbstractC6973 abstractC69732;
AbstractC6973 abstractC69733;
AbstractC6973 abstractC69734;
y82.m51531(view$OnClickListenerC1406, "dialog");
view$OnClickListenerC1406.m8768();
r83.m39055().m39059();
abstractC6973 = SplashActivity.this.mPresenter;
SplashContract.Presenter presenter = (SplashContract.Presenter) abstractC6973;
if (presenter != null) {
presenter.initABTestConfig();
}
abstractC69732 = SplashActivity.this.mPresenter;
SplashContract.Presenter presenter2 = (SplashContract.Presenter) abstractC69732;
if (presenter2 != null) {
presenter2.prepareHolidayActivityImage();
}
abstractC69733 = SplashActivity.this.mPresenter;
SplashContract.Presenter presenter3 = (SplashContract.Presenter) abstractC69733;
if (presenter3 != null) {
presenter3.saveUUID();
}
abstractC69734 = SplashActivity.this.mPresenter;
SplashContract.Presenter presenter4 = (SplashContract.Presenter) abstractC69734;
if (presenter4 != null) {
presenter4.isExists();
}
new m62().m30809();
dc6.f13598.m16936().encode(w14.f38907, false);
TrackUtils.m14937(uj4.f36579, 0, null, 6, null);
TrackUtils.m14937(uj4.f36704, 0, null, 6, null);
SplashActivity.this.checkFloatBallPermission();
}
}).m8759(false).m8757();
}
private final void showUpdateDialog() {
this.handler.post(new Runnable() {
@Override
public final void run() {
SplashActivity.m10689showUpdateDialog$lambda7(SplashActivity.this);
}
});
}
public static final void m10689showUpdateDialog$lambda7(SplashActivity splashActivity) {
y82.m51531(splashActivity, "this$0");
UpdateBean.App.UpdateDetail updateDetail = splashActivity.updateDetail;
y82.m51521(updateDetail);
String m4761 = cc1.m4761(updateDetail.versionSize * 1024);
View$OnClickListenerC1398 m8731 = View$OnClickListenerC1398.m8726(splashActivity.findViewById(16908290)).m8731(splashActivity.getString(R.string.update_1));
StringBuilder sb = new StringBuilder();
sb.append("\n ");
sb.append(splashActivity.getString(R.string.rename_vm_14));
UpdateBean.App.UpdateDetail updateDetail2 = splashActivity.updateDetail;
y82.m51521(updateDetail2);
sb.append(updateDetail2.versionName);
sb.append("\n ");
sb.append(splashActivity.getString(R.string.rename_vm_15));
sb.append(m4761);
sb.append("\n ");
View$OnClickListenerC1398 m8732 = m8731.m8732(np5.m33317(sb.toString()));
UpdateBean.App.UpdateDetail updateDetail3 = splashActivity.updateDetail;
y82.m51521(updateDetail3);
View$OnClickListenerC1398 m8730 = m8732.m8730(updateDetail3.updateContent);
UpdateBean.App.UpdateDetail updateDetail4 = splashActivity.updateDetail;
y82.m51521(updateDetail4);
View$OnClickListenerC1398 m8729 = m8730.m8729(updateDetail4.m11544());
UpdateBean.App.UpdateDetail updateDetail5 = splashActivity.updateDetail;
y82.m51521(updateDetail5);
View$OnClickListenerC1398 m8739 = m8729.m8734(!updateDetail5.m11544()).m8739(false);
UpdateBean.App.UpdateDetail updateDetail6 = splashActivity.updateDetail;
y82.m51521(updateDetail6);
String str = updateDetail6.downloadUrl;
StringBuilder sb2 = new StringBuilder();
sb2.append(splashActivity.getApplicationInfo().dataDir);
sb2.append(dy.f14340);
UpdateBean.App.UpdateDetail updateDetail7 = splashActivity.updateDetail;
y82.m51521(updateDetail7);
sb2.append(updateDetail7.versionCode);
String sb3 = sb2.toString();
UpdateBean.App.UpdateDetail updateDetail8 = splashActivity.updateDetail;
y82.m51521(updateDetail8);
String str2 = updateDetail8.md5;
UpdateBean.App.UpdateDetail updateDetail9 = splashActivity.updateDetail;
y82.m51521(updateDetail9);
m8739.m8740(str, sb3, str2, updateDetail9.md5Sum).m8738(splashActivity).m8733();
}
public final void startLocalRom(final View view) {
C1414.m8776(view).m8780(getString(R.string.copy_tom_wait_minute)).m8781();
Observable.create(new ObservableOnSubscribe() {
@Override
public final void subscribe(ObservableEmitter observableEmitter) {
SplashActivity.m10690startLocalRom$lambda8(SplashActivity.this, view, observableEmitter);
}
}).subscribeOn(Schedulers.newThread()).subscribe();
}
public static void startLocalRom$default(SplashActivity splashActivity, View view, int i, Object obj) {
if ((i & 1) != 0) {
view = splashActivity.findViewById(16908290);
}
splashActivity.startLocalRom(view);
}
public static final void m10690startLocalRom$lambda8(final SplashActivity splashActivity, View view, ObservableEmitter observableEmitter) {
y82.m51531(splashActivity, "this$0");
try {
File file = new File(splashActivity.getFilesDir(), ku.f23764);
File parentFile = file.getParentFile();
if (parentFile != null) {
parentFile.mkdirs();
}
cc1.m4771(splashActivity.getAssets().open(ku.f23764), new FileOutputStream(file));
dc6.f13598.m16936().encode(w14.f38925, true);
GuestOsInfo guestOsInfo = (GuestOsInfo) jq1.m27407(cc1.m4778(splashActivity.getAssets().open(dy.f14330)), GuestOsInfo.class);
if (guestOsInfo != null) {
hj6.m23623().m23653(splashActivity, new LocalRomBean(file, guestOsInfo), true, view, new StartRendererActCallback() {
@Override
public void onRendererActStarted() {
SplashActivity.this.finishByNoAnima();
}
@Override
public void onUserCancelStartRendererAct() {
}
}, false, splashActivity.getString(R.string.android_vm));
}
} catch (IOException e) {
e.printStackTrace();
splashActivity.startToMain();
}
}
public final void startToDeepGuide() {
String m55307 = C7305.m55293().m55307();
y82.m51530(m55307, "channel");
if (up5.m45300(m55307, "android_", false, 2, null)) {
startActivity(new Intent(this, MainActivity.class));
return;
}
synchronized (this) {
if (this.started) {
return;
}
this.started = true;
C0974.m6718(new Intent(this, DeepGuideActivity.class));
finishByNoAnima();
j66 j66Var = j66.f21418;
}
}
private final void startToMain() {
Log.i(TAG, "remove ad callback");
this.handler.removeCallbacks(this.adCallback);
Log.i(TAG, "startToMain");
Intent intent = new Intent(this, MainActivity.class);
intent.putExtra("vm_local_id", getIntent().getIntExtra("vm_local_id", -1));
startToMain(intent);
}
@Override
public void adWorkDone() {
synchronized (this) {
if (!this.adWorkDone) {
this.adWorkDone = true;
if (this.checkedUpdate) {
if (this.hasUpdate && this.updateDetail != null) {
showUpdateDialog();
} else {
Log.i(TAG, "adWorkDone startToMain");
startToMain();
}
}
}
j66 j66Var = j66.f21418;
}
}
@Override
public void doSetUp() {
try {
String[] list = getAssets().list("");
y82.m51521(list);
for (String str : list) {
if (TextUtils.equals(str, ku.f23764)) {
this.hasAssetRom = true;
dc6.f13598.m16936().encode(w14.f38912, false);
}
}
} catch (Exception e) {
e.printStackTrace();
}
getGpuInfo();
dc6 dc6Var = dc6.f13598;
if (dc6Var.m16936().decodeBool(w14.f38907, true)) {
showProtocol();
} else if (dc6Var.m16936().decodeBool(w14.f38912, true)) {
startToDeepGuide();
} else {
fetchSplashAD();
SplashContract.Presenter presenter = (SplashContract.Presenter) this.mPresenter;
if (presenter != null) {
presenter.initABTestConfig();
}
SplashContract.Presenter presenter2 = (SplashContract.Presenter) this.mPresenter;
if (presenter2 != null) {
presenter2.prepareHolidayActivityImage();
}
SplashContract.Presenter presenter3 = (SplashContract.Presenter) this.mPresenter;
if (presenter3 != null) {
presenter3.saveUUID();
}
SplashContract.Presenter presenter4 = (SplashContract.Presenter) this.mPresenter;
if (presenter4 != null) {
presenter4.isExists();
}
Log.d(TAG, "广告加载了一次");
SplashContract.Presenter presenter5 = (SplashContract.Presenter) this.mPresenter;
if (presenter5 != null) {
presenter5.checkUpdate();
}
new m62().m30809();
if (AccountHelper.get().notLogin()) {
return;
}
P p = this.mPresenter;
y82.m51521(p);
((SplashContract.Presenter) p).checkUserConf(AccountHelper.get().getUserConf());
}
}
@Override
public int getLayoutId() {
return R.layout.activity_splash;
}
@Override
public void hasUpdate(@NotNull UpdateBean.App.UpdateDetail updateDetail) {
y82.m51531(updateDetail, "updateDetail");
synchronized (this) {
if (!this.checkedUpdate) {
this.checkedUpdate = true;
this.updateDetail = updateDetail;
if (!updateDetail.m11544()) {
MMKV m16936 = dc6.f13598.m16936();
}
this.hasUpdate = true;
if (this.adWorkDone) {
if (this.hasUpdate) {
showUpdateDialog();
} else {
Log.i(TAG, "hasUpdate startToMain");
startToMain();
}
}
}
j66 j66Var = j66.f21418;
}
}
@Override
public void loadAd(@NotNull String str) {
y82.m51531(str, "pictureUrl");
Log.i(TAG, "loadAd");
final ImageView imageView = new ImageView(this);
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setOnClickListener(new qw4() {
@Override
public void onSafeClick(@NotNull View view) {
Handler handler;
Runnable runnable;
y82.m51531(view, "view");
Log.i("SPLASH_SplashActivity", "click ad");
handler = SplashActivity.this.handler;
runnable = SplashActivity.this.adCallback;
handler.removeCallbacks(runnable);
JoinVipPaymentActivity.Companion.startForResult(SplashActivity.this, 19, (String) null);
SplashActivity.this.finishByNoAnima();
}
});
ho1.f18937.m23878(imageView, str, new ho1.InterfaceC3220() {
@Override
public void onLoadFailed() {
Log.w("SPLASH_SplashActivity", "onLoadFailed");
SplashActivity.this.adWorkDone();
}
@Override
public void onLoadSuccess(@Nullable Drawable drawable) {
Log.i("SPLASH_SplashActivity", "onLoadSuccess");
SplashActivity.this.onAdPresent();
imageView.setImageDrawable(drawable);
q56.m37309(xy.f41590);
}
});
}
@Override
public void noUpdate() {
synchronized (this) {
if (!this.checkedUpdate) {
this.checkedUpdate = true;
this.hasUpdate = false;
if (this.adWorkDone) {
Log.i(TAG, "noUpdate startToMain");
startToMain();
}
}
j66 j66Var = j66.f21418;
}
}
@Override
public void onAdPresent() {
Log.i(TAG, "onAdPresent");
dc6.f13598.m16935(w14.f38906, w14.f38906, 120);
if6.m24979(this.tvSkipAd);
countdownAdTime();
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
dc6 dc6Var = dc6.f13598;
if (dc6Var.m16936().decodeInt(w14.f38938, 0) == 0) {
ScreenUtil.initNotchHeight(this);
r83.m39055().m39064(ScreenUtil.getScreenHeightWithoutNotch(this));
dc6Var.m16936().encode(w14.f38938, ScreenUtil.getScreenHeightWithoutNotch(this) + 0.0d);
}
}
@Override
public void onClick(@NotNull View view) {
y82.m51531(view, bg.aE);
if (view.getId() == R.id.tv_skip_splash_ad) {
adWorkDone();
}
}
@Override
public void onCreate(@Nullable Bundle bundle) {
super.onCreate(bundle);
if (this.mPresenter == 0) {
this.mPresenter = createPresenter();
}
}
@Override
public void onFileDownloadSuccess(@NotNull View$OnClickListenerC1398 view$OnClickListenerC1398) {
y82.m51531(view$OnClickListenerC1398, "dialog");
P p = this.mPresenter;
y82.m51521(p);
String str = getApplicationInfo().dataDir;
StringBuilder sb = new StringBuilder();
sb.append(dy.f14340);
UpdateBean.App.UpdateDetail updateDetail = this.updateDetail;
y82.m51521(updateDetail);
sb.append(updateDetail.versionCode);
((SplashContract.Presenter) p).installApk(new File(str, sb.toString()));
}
@Override
public void onPause() {
super.onPause();
if (this.countingAdTime) {
this.countedTime = (int) (SystemClock.uptimeMillis() - this.startCountTime);
}
}
@Override
public void onResume() {
super.onResume();
if (this.countingAdTime) {
this.handler.postDelayed(this.adCallback, 1000 - this.countedTime);
}
if (this.requestFloatPermission) {
if (this.hasAssetRom) {
startLocalRom$default(this, null, 1, null);
} else {
startToDeepGuide();
}
}
}
@Override
public void onViewClick(@NotNull View view, @NotNull View$OnClickListenerC1398 view$OnClickListenerC1398) {
y82.m51531(view, bg.aE);
y82.m51531(view$OnClickListenerC1398, "dialog");
switch (view.getId()) {
case R.id.tv_ignore_this_update:
MMKV m16936 = dc6.f13598.m16936();
StringBuilder sb = new StringBuilder();
sb.append(w14.f38922);
UpdateBean.App.UpdateDetail updateDetail = this.updateDetail;
y82.m51521(updateDetail);
sb.append(updateDetail.versionCode);
m16936.encode(sb.toString(), true);
startToMain();
return;
case R.id.tv_update_action_install:
P p = this.mPresenter;
y82.m51521(p);
String str = getApplicationInfo().dataDir;
StringBuilder sb2 = new StringBuilder();
sb2.append(dy.f14340);
UpdateBean.App.UpdateDetail updateDetail2 = this.updateDetail;
y82.m51521(updateDetail2);
sb2.append(updateDetail2.versionCode);
((SplashContract.Presenter) p).installApk(new File(str, sb2.toString()));
return;
case R.id.tv_update_action_next_time:
startToMain();
return;
default:
return;
}
}
@Override
public void onWindowFocusChanged(boolean z) {
super.onWindowFocusChanged(z);
if (z) {
ey4.m19871(getWindow(), true, true);
}
}
@Override
public void setUp() {
this.adContainer = (FrameLayout) findViewById(R.id.fl_splash_ad_container);
this.tvSkipAd = (TextView) findViewById(R.id.tv_skip_splash_ad);
ey4.m19871(getWindow(), true, true);
P p = this.mPresenter;
y82.m51521(p);
((SplashContract.Presenter) p).doPreSetUp();
}
@Override
@NotNull
public SplashContract.Presenter createPresenter() {
return new SplashPresenter();
}
private final void startToMain(Intent intent) {
synchronized (this) {
if (this.started) {
return;
}
this.started = true;
startActivity(intent);
finishByNoAnima();
j66 j66Var = j66.f21418;
}
}
}