正在查看: Minits v4.9.3.32 应用的 LoadAppActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Minits v4.9.3.32 应用的 LoadAppActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.xone.android.framework.activities;
import B0.h;
import B8.g;
import C8.B;
import Za.t;
import Za.x;
import a8.C0394a;
import android.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.ImageDecoder;
import android.graphics.Typeface;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.media.MediaPlayer;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.VideoView;
import androidx.annotation.Keep;
import b8.C0;
import b8.D0;
import com.xone.android.framework.AbstractC0563e;
import com.xone.android.framework.AbstractC0564f;
import com.xone.android.framework.AbstractC0565g;
import com.xone.android.framework.AbstractC0568j;
import com.xone.android.framework.activities.LoadAppActivity;
import com.xone.android.framework.xoneApp;
import com.xone.android.utils.Utils;
import db.RunnableC0599d;
import g8.DialogC0706f;
import h8.C0739d;
import h8.C0740e;
import h8.C0741f;
import ha.AbstractC0751f;
import ha.r;
import ha.u;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.Locale;
import p7.m;
import w7.s;
public class LoadAppActivity extends Activity {
public static WeakReference s;
public RelativeLayout l;
public ProgressBar m;
public TextView n;
public VideoView o;
public AlertDialog p;
public DialogC0706f q;
public String r;
public static void Q(LoadAppActivity loadAppActivity, CharSequence charSequence) {
ProgressBar progressBar = loadAppActivity.m;
if (progressBar != null) {
progressBar.incrementProgressBy(1);
}
TextView textView = loadAppActivity.n;
if (textView != null) {
textView.setText(charSequence);
}
}
public static boolean c(MediaPlayer mediaPlayer, int i, int i2) {
return false;
}
public static void e(MediaPlayer mediaPlayer) {
}
public static void g(Context context, WeakReference weakReference, String str, String str2, DialogInterface dialogInterface, int i) {
new s(context, weakReference, str, str2).t();
dialogInterface.dismiss();
}
public static void l(Dialog dialog) {
if (dialog == null) {
return;
}
try {
if (dialog.isShowing()) {
dialog.dismiss();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static LoadAppActivity s() {
LoadAppActivity loadAppActivity;
WeakReference weakReference = s;
if (weakReference == null || (loadAppActivity = (LoadAppActivity) weakReference.get()) == null || loadAppActivity.z()) {
return null;
}
return loadAppActivity;
}
public static Intent u() {
xoneApp Z0 = xoneApp.Z0();
String E1 = Z0.E1();
Intent intent = new Intent("android.intent.action.MAIN");
return TextUtils.isEmpty(E1) ? intent.setClass(Z0, LoadAppActivity.class) : E1.compareTo("portrait") == 0 ? intent.setClass(Z0, LoadAppActivityPortrait.class) : E1.compareTo("landscape") == 0 ? intent.setClass(Z0, LoadAppActivityLandscape.class) : intent.setClass(Z0, LoadAppActivity.class);
}
@Keep
public static void updateMessages(Object obj) {
final CharSequence text;
final LoadAppActivity s2 = s();
if (s2 != null && s2.o == null) {
if (obj instanceof CharSequence) {
text = obj.toString();
} else {
if (!(obj instanceof Number)) {
throw new IllegalArgumentException("Unknown message class type");
}
text = s2.getApplicationContext().getResources().getText(((Number) obj).intValue());
}
if (TextUtils.isEmpty(text)) {
Utils.l("XOneAndroidFramework", "LoadAppActivity.doUpdateMessages(): Empty text received");
} else if (Utils.s3()) {
Q(s2, text);
} else {
s2.runOnUiThread(new Runnable() {
@Override
public final void run() {
LoadAppActivity.Q(LoadAppActivity.this, text);
}
});
}
}
}
public final void A(MediaPlayer mediaPlayer) {
xoneApp.Z0().y = true;
VideoView videoView = this.o;
if (videoView != null) {
videoView.setVisibility(8);
}
L();
}
public final void B(View view) {
if (this.o != null) {
while (this.o.isPlaying()) {
this.o.stopPlayback();
try {
Thread.sleep(1000L);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
if (xoneApp.Z0().y) {
L();
}
}
public final void C() {
this.m.setVisibility(8);
this.n.setVisibility(8);
}
public final void D() {
this.l.setVisibility(8);
}
public final void F() {
this.m.setVisibility(0);
this.n.setVisibility(0);
}
public final void G() {
this.l.setVisibility(0);
}
public final void H() {
Resources resources = getResources();
M(resources.getDisplayMetrics().widthPixels, h.e(resources, AbstractC0563e.l, (Resources.Theme) null));
}
public final void I(File file) {
ImageDecoder.Source createSource;
Drawable decodeDrawable;
Resources resources = getResources();
int i = resources.getDisplayMetrics().widthPixels;
long length = file.length();
if (length <= 0) {
throw new IOException("Cannot load splash image " + file.getAbsolutePath() + ", file size is " + length + " bytes");
}
String lowerCase = file.getName().toLowerCase(Locale.US);
if (Build.VERSION.SDK_INT >= 28 && lowerCase.endsWith(".webp")) {
createSource = ImageDecoder.createSource(file);
decodeDrawable = ImageDecoder.decodeDrawable(createSource);
if (C0.a(decodeDrawable)) {
D0.a(decodeDrawable).start();
}
M(i, decodeDrawable);
return;
}
if (lowerCase.endsWith(".gif")) {
RunnableC0599d runnableC0599d = new RunnableC0599d(file, i, 0);
M(i, runnableC0599d);
runnableC0599d.setVisible(true, true);
return;
}
if (!lowerCase.endsWith(".apng")) {
Bitmap n = r.n(file, i, 0, false);
if (n != null) {
M(i, new BitmapDrawable(resources, n));
return;
}
throw new IOException("Cannot obtain bitmap from file " + file.getAbsolutePath());
}
try {
Drawable b = x.b(xoneApp.Z0(), new FileInputStream(file));
M(i, b);
if (b instanceof AnimationDrawable) {
((AnimationDrawable) b).start();
}
} catch (t e) {
throw AbstractC0751f.e(e);
}
}
public final void J(File file) {
this.l.setBackground(null);
this.m.setVisibility(4);
this.n.setVisibility(4);
ViewGroup.LayoutParams layoutParams = this.l.getLayoutParams();
layoutParams.height = -1;
layoutParams.width = -1;
m(file);
}
public final void K(String str) {
if (Utils.d3(getApplicationContext())) {
StringBuilder sb2 = new StringBuilder();
if (TextUtils.isEmpty(this.r)) {
this.r = getClass().getSimpleName();
}
if (TextUtils.isEmpty(this.r)) {
this.r = "XoneBaseActivity";
}
sb2.append(this.r);
if (TextUtils.isEmpty(str)) {
sb2.append(" unknown event fired.");
} else {
sb2.append(' ');
sb2.append(str);
sb2.append(" event fired.");
}
Utils.k("XOneAndroidFramework", sb2);
}
}
public final void L() {
Utils.l("XOneAndroidFramework", "LoadAppActivity.quitActivity() invoked, result code: -1");
setResult(-1);
finish();
}
public final void M(int i, Drawable drawable) {
int height = drawable instanceof BitmapDrawable ? ((BitmapDrawable) drawable).getBitmap().getHeight() : -2;
this.l.setBackground(drawable);
ViewGroup.LayoutParams layoutParams = this.l.getLayoutParams();
layoutParams.width = i;
layoutParams.height = height;
this.l.setLayoutParams(layoutParams);
}
public void E(final int i, final String str, final String str2, final g gVar) {
if (z()) {
return;
}
if (!Utils.s3()) {
runOnUiThread(new Runnable() {
@Override
public final void run() {
LoadAppActivity.this.E(i, str, str2, gVar);
}
});
return;
}
DialogC0706f t = t();
t.d(i, gVar, str, str2);
t.show();
}
public void O() {
if (!Utils.s3()) {
runOnUiThread(new Runnable() {
@Override
public final void run() {
LoadAppActivity.this.F();
}
});
} else {
this.m.setVisibility(0);
this.n.setVisibility(0);
}
}
public void P() {
if (Utils.s3()) {
this.l.setVisibility(0);
} else {
runOnUiThread(new Runnable() {
@Override
public final void run() {
LoadAppActivity.this.G();
}
});
}
}
public final void m(File file) {
VideoView videoView = (VideoView) findViewById(AbstractC0564f.H0);
this.o = videoView;
if (videoView == null) {
return;
}
videoView.setVideoPath(file.getAbsolutePath());
this.o.setMediaController(null);
this.o.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public final void onPrepared(MediaPlayer mediaPlayer) {
LoadAppActivity.e(mediaPlayer);
}
});
this.o.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public final void onCompletion(MediaPlayer mediaPlayer) {
LoadAppActivity.this.A(mediaPlayer);
}
});
this.o.setOnErrorListener(new MediaPlayer.OnErrorListener() {
@Override
public final boolean onError(MediaPlayer mediaPlayer, int i, int i2) {
return LoadAppActivity.c(mediaPlayer, i, i2);
}
});
Button button = (Button) findViewById(AbstractC0564f.F0);
if (button != null) {
button.setVisibility(0);
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
LoadAppActivity.this.B(view);
}
});
}
this.o.requestFocus();
this.o.setVisibility(0);
this.o.start();
}
public void n() {
VideoView videoView = this.o;
if (videoView == null) {
L();
} else {
if (videoView.isPlaying()) {
return;
}
L();
}
}
public final File o() {
xoneApp Z0 = xoneApp.Z0();
String Y = Z0.Y();
String T = Z0.T();
File r = r(Utils.B0(Y, T, "./splash.jpg"));
if (r != null) {
return r;
}
File r2 = r(Utils.B0(Y, T, "./splash.png"));
if (r2 != null) {
return r2;
}
File r3 = r(Utils.B0(Y, T, "./splash.gif"));
if (r3 != null) {
return r3;
}
File r4 = r(Utils.D0(Y, T, "./splash.bmp", true));
if (r4 != null) {
return r4;
}
File r5 = r(Utils.D0(Y, T, "./splash.webp", true));
return r5 != null ? r5 : r(Utils.D0(Y, T, "./splash.apng", true));
}
@Override
public void onCreate(Bundle bundle) {
K("onCreate");
requestWindowFeature(1);
super.onCreate(bundle);
setContentView(AbstractC0565g.l);
s = new WeakReference(this);
try {
Window window = getWindow();
window.getAttributes().dimAmount = 0.5f;
window.setFlags(2, 2);
this.l = (RelativeLayout) findViewById(AbstractC0564f.G0);
this.m = (ProgressBar) findViewById(AbstractC0564f.E0);
this.n = (TextView) findViewById(AbstractC0564f.D0);
this.m.setMax(3);
File v = v();
if (v != null) {
J(v);
} else {
File o = o();
if (o != null) {
I(o);
} else {
H();
}
}
xoneApp Z0 = xoneApp.Z0();
if (Z0.s1() != null && Z0.y) {
return;
}
Z0.M2(new B().runSeriallyAsyncTask());
} catch (Exception e) {
w(e);
}
}
@Override
public void onDestroy() {
K("onDestroy");
WeakReference weakReference = s;
if (weakReference != null) {
weakReference.clear();
s = null;
}
l(this.p);
l(this.q);
super.onDestroy();
}
@Override
public void onRestoreInstanceState(Bundle bundle) {
K("onRestoreInstanceState");
super.onRestoreInstanceState(bundle);
String string = bundle.getString("LoadAppActivity-name");
if (string != null) {
this.n.setText(string);
}
this.m.setProgress(bundle.getInt("LoadAppActivity-progressvalue"));
if (xoneApp.Z0().s1() != null) {
setProgressBarIndeterminateVisibility(true);
}
}
@Override
public void onSaveInstanceState(Bundle bundle) {
K("onSaveInstanceState");
super.onSaveInstanceState(bundle);
CharSequence text = this.n.getText();
if (text != null) {
String charSequence = text.toString();
if (!TextUtils.isEmpty(charSequence)) {
bundle.putString("LoadAppActivity-name", charSequence);
}
}
bundle.putInt("LoadAppActivity-progressvalue", this.m.getProgress());
}
public void p(DialogInterface dialogInterface) {
if (dialogInterface != null) {
dialogInterface.dismiss();
}
setResult(0);
finish();
xoneApp.Z0().y = true;
}
public final Typeface q() {
return h.g(getApplicationContext(), u.a);
}
public final File r(String str) {
if (TextUtils.isEmpty(str)) {
return null;
}
File file = new File(str);
if (file.exists()) {
return file;
}
return null;
}
public DialogC0706f t() {
l(this.q);
DialogC0706f dialogC0706f = new DialogC0706f(this);
this.q = dialogC0706f;
return dialogC0706f;
}
public final File v() {
xoneApp Z0 = xoneApp.Z0();
String T = Z0.T();
File file = new File(T, "splash.3gp");
if (file.exists() && file.isFile()) {
return file;
}
File file2 = new File(T, "splash.mp4");
if (file2.exists() && file2.isFile()) {
return file2;
}
File file3 = new File(Environment.getExternalStorageDirectory(), "/xone/app_" + Z0.Y());
if (!file3.exists()) {
return null;
}
File file4 = new File(file3, "splash.3gp");
if (file4.exists() && file4.isFile()) {
return file4;
}
File file5 = new File(file3, "splash.mp4");
if (file5.exists() && file5.isFile()) {
return file5;
}
return null;
}
public void w(Throwable th) {
int i;
final String message;
if (th == null) {
return;
}
Throwable cause = th.getCause();
boolean z = true;
if (th instanceof C0741f) {
i = AbstractC0568j.y;
message = th.getMessage();
} else if (th instanceof C0739d) {
i = AbstractC0568j.s;
message = th.getMessage();
} else if (th instanceof C0740e) {
i = AbstractC0568j.z;
message = th.getMessage();
} else {
if (th instanceof C0394a) {
i = AbstractC0568j.q;
message = th.getMessage();
} else if (cause instanceof C0394a) {
int i2 = AbstractC0568j.q;
message = cause.getMessage();
i = i2;
} else {
i = AbstractC0568j.q;
message = th.getMessage();
}
z = false;
}
if (TextUtils.isEmpty(message)) {
message = Utils.M2(th);
}
final String L2 = Utils.L2(th);
AlertDialog.Builder R2 = XoneBaseActivity.R2(this, null, message, new m());
R2.setTitle(i);
if (z) {
final Context applicationContext = getApplicationContext();
final WeakReference weakReference = new WeakReference(findViewById(R.id.content));
R2.setNeutralButton(w7.h.g, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i3) {
LoadAppActivity.g(applicationContext, weakReference, message, L2, dialogInterface, i3);
}
});
} else {
R2.setNeutralButton((CharSequence) null, (DialogInterface.OnClickListener) null);
}
AlertDialog create = R2.create();
this.p = create;
create.setOwnerActivity(this);
this.p.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public final void onDismiss(DialogInterface dialogInterface) {
LoadAppActivity.this.p(dialogInterface);
}
});
this.p.show();
TextView textView = (TextView) this.p.findViewById(R.id.message);
if (textView != null) {
textView.setTypeface(q());
}
}
public void x() {
if (!Utils.s3()) {
runOnUiThread(new Runnable() {
@Override
public final void run() {
LoadAppActivity.this.C();
}
});
} else {
this.m.setVisibility(8);
this.n.setVisibility(8);
}
}
public void y() {
if (Utils.s3()) {
this.l.setVisibility(8);
} else {
runOnUiThread(new Runnable() {
@Override
public final void run() {
LoadAppActivity.this.D();
}
});
}
}
public boolean z() {
return isDestroyed();
}
}