Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
package com.mbridge.msdk.foundation.same.c;
/* loaded from: classes4.dex */
public final class a {
/* JADX WARN: Not initialized variable reg: 1, insn: 0x0025: MOVE (r0 I:??[OBJECT, ARRAY]) = (r1 I:??[OBJECT, ARRAY]), block:B:35:0x0025 */
/* JADX WARN: Removed duplicated region for block: B:38:0x0045 A[EXC_TOP_SPLITTER, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static java.io.InputStream a(android.graphics.Bitmap r4) {
/*
r0 = 0
java.io.ByteArrayOutputStream r1 = new java.io.ByteArrayOutputStream // Catch: java.lang.Throwable -> L29 java.lang.Exception -> L2b
r1.<init>() // Catch: java.lang.Throwable -> L29 java.lang.Exception -> L2b
android.graphics.Bitmap$CompressFormat r2 = android.graphics.Bitmap.CompressFormat.JPEG // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L27
r3 = 100
r4.compress(r2, r3, r1) // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L27
java.io.ByteArrayInputStream r4 = new java.io.ByteArrayInputStream // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L27
byte[] r2 = r1.toByteArray() // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L27
r4.<init>(r2) // Catch: java.lang.Throwable -> L24 java.lang.Exception -> L27
r1.close() // Catch: java.lang.Exception -> L1a
goto L22
L1a:
r0 = move-exception
boolean r1 = com.mbridge.msdk.MBridgeConstans.DEBUG
if (r1 == 0) goto L22
r0.printStackTrace()
L22:
r0 = r4
goto L42
L24:
r4 = move-exception
r0 = r1
goto L43
L27:
r4 = move-exception
goto L2d
L29:
r4 = move-exception
goto L43
L2b:
r4 = move-exception
r1 = r0
L2d:
boolean r2 = com.mbridge.msdk.MBridgeConstans.DEBUG // Catch: java.lang.Throwable -> L24
if (r2 == 0) goto L34
r4.printStackTrace() // Catch: java.lang.Throwable -> L24
L34:
if (r1 == 0) goto L42
r1.close() // Catch: java.lang.Exception -> L3a
goto L42
L3a:
r4 = move-exception
boolean r1 = com.mbridge.msdk.MBridgeConstans.DEBUG
if (r1 == 0) goto L42
r4.printStackTrace()
L42:
return r0
L43:
if (r0 == 0) goto L51
r0.close() // Catch: java.lang.Exception -> L49
goto L51
L49:
r0 = move-exception
boolean r1 = com.mbridge.msdk.MBridgeConstans.DEBUG
if (r1 == 0) goto L51
r0.printStackTrace()
L51:
throw r4
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.foundation.same.c.a.a(android.graphics.Bitmap):java.io.InputStream");
}
}

View File

@@ -0,0 +1,45 @@
package com.mbridge.msdk.foundation.same.c;
import android.content.Context;
import android.graphics.Bitmap;
import com.mbridge.msdk.foundation.same.c.d;
import com.mbridge.msdk.foundation.tools.ak;
/* loaded from: classes4.dex */
public final class b {
private static b a;
private b(Context context) {
}
public static b a(Context context) {
if (a == null) {
a = new b(context);
}
return a;
}
public final Bitmap a(String str) {
d dVar;
if (ak.k(str)) {
return null;
}
dVar = d.a.a;
return dVar.a(str);
}
public final boolean b(String str) {
d dVar;
if (ak.k(str)) {
return false;
}
dVar = d.a.a;
return dVar.b(str);
}
public final void a(String str, c cVar) {
d dVar;
dVar = d.a.a;
dVar.a(str, null, cVar);
}
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.foundation.same.c;
import android.graphics.Bitmap;
/* loaded from: classes4.dex */
public interface c {
void onFailedLoad(String str, String str2);
void onSuccessLoad(Bitmap bitmap, String str);
}

View File

@@ -0,0 +1,274 @@
package com.mbridge.msdk.foundation.same.c;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.download.DownloadError;
import com.mbridge.msdk.foundation.download.DownloadMessage;
import com.mbridge.msdk.foundation.download.DownloadPriority;
import com.mbridge.msdk.foundation.download.DownloadResourceType;
import com.mbridge.msdk.foundation.download.MBDownloadManager;
import com.mbridge.msdk.foundation.download.OnDownloadStateListener;
import com.mbridge.msdk.foundation.download.core.DownloadRequest;
import com.mbridge.msdk.foundation.tools.ad;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.playercommon.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil;
import java.io.File;
import java.util.concurrent.ThreadPoolExecutor;
/* loaded from: classes4.dex */
public final class d {
private final ThreadPoolExecutor a;
private final Handler b;
private final String c;
public static final class a {
private static final d a = new d();
}
private d() {
this.b = new Handler(Looper.getMainLooper());
this.c = com.mbridge.msdk.foundation.same.b.e.a(com.mbridge.msdk.foundation.same.b.c.MBRIDGE_700_IMG) + File.separator;
this.a = f.a();
}
public final Bitmap a(String str) {
if (MBridgeConstans.DEBUG) {
af.a("CommonImageLoaderRefactor", "getImageBitmapByUrl imageUrl = " + str);
}
if (TextUtils.isEmpty(str)) {
return null;
}
String str2 = this.c + ad.c(str);
File file = new File(str2);
if (file.isFile() && file.exists()) {
try {
return d(str2);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "getImageBitmapByUrl error", e);
}
}
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static Bitmap d(String str) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(str, options);
options.inJustDecodeBounds = false;
options.inPurgeable = true;
options.inInputShareable = true;
options.inDither = true;
return BitmapFactory.decodeFile(str, options);
}
public final boolean b(String str) {
File file;
if (MBridgeConstans.DEBUG) {
af.a("CommonImageLoaderRefactor", "isImageFileExists imageUrl = " + str);
}
if (TextUtils.isEmpty(str)) {
return false;
}
try {
try {
file = new File(this.c + ad.c(str));
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "isImageFileExists error", e);
}
file = null;
}
if (file == null || !file.isFile()) {
return false;
}
return file.exists();
} catch (Exception e2) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "isImageFileExists error", e2);
}
return false;
}
}
/* JADX INFO: Access modifiers changed from: private */
public DownloadRequest<?> a(String str, String str2, g gVar, c cVar) {
try {
return MBDownloadManager.getInstance().download(new DownloadMessage<>(new Object(), str2, str, 100, DownloadResourceType.DOWNLOAD_RESOURCE_TYPE_IMAGE)).withReadTimeout(com.mbridge.msdk.foundation.same.a.u).withConnectTimeout(com.mbridge.msdk.foundation.same.a.t).withWriteTimeout(com.mbridge.msdk.foundation.same.a.s).withDownloadPriority(DownloadPriority.LOW).withHttpRetryCounter(1).withDirectoryPathInternal(this.c).withDownloadStateListener(new b(this.b, this.a, str2, this.c, str, gVar, cVar)).with("download_scene", "download_image").withProgressStateListener(null).withTimeout(ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS).with("do_us_fi_re", Boolean.FALSE.toString()).build();
} catch (Exception e) {
if (!MBridgeConstans.DEBUG) {
return null;
}
af.b("CommonImageLoaderRefactor", "createDownloadRequest error", e);
return null;
}
}
public static final class b implements OnDownloadStateListener<Object> {
private final ThreadPoolExecutor a;
private final Handler b;
private final String c;
private final String d;
private final g e;
private final String f;
private final c g;
@Override // com.mbridge.msdk.foundation.download.OnDownloadStateListener
public final void onCancelDownload(DownloadMessage<Object> downloadMessage) {
}
@Override // com.mbridge.msdk.foundation.download.OnDownloadStateListener
public final void onDownloadStart(DownloadMessage<Object> downloadMessage) {
}
public b(Handler handler, ThreadPoolExecutor threadPoolExecutor, String str, String str2, String str3, g gVar, c cVar) {
this.b = handler;
this.a = threadPoolExecutor;
this.f = str;
this.c = str2;
this.d = str3;
this.e = gVar;
this.g = cVar;
}
private void a(final String str) {
if (this.g == null) {
return;
}
this.b.post(new Runnable() { // from class: com.mbridge.msdk.foundation.same.c.d.b.2
@Override // java.lang.Runnable
public final void run() {
try {
b.this.g.onFailedLoad(b.this.f, str);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "callbackForFailed error", e);
}
}
}
});
}
private Bitmap a(Bitmap bitmap, g gVar) {
if (gVar == null) {
return bitmap;
}
try {
return gVar.a(bitmap);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "handlerImageTransformation error", e);
}
return bitmap;
}
}
@Override // com.mbridge.msdk.foundation.download.OnDownloadStateListener
public final void onDownloadError(DownloadMessage<Object> downloadMessage, DownloadError downloadError) {
if (MBridgeConstans.DEBUG) {
af.a("CommonImageLoaderRefactor", "onDownloadError imageUrl = " + downloadError.getException().getLocalizedMessage());
}
a(downloadError.getException().getLocalizedMessage());
}
@Override // com.mbridge.msdk.foundation.download.OnDownloadStateListener
public final void onDownloadComplete(DownloadMessage<Object> downloadMessage) {
File file;
if (MBridgeConstans.DEBUG) {
af.a("CommonImageLoaderRefactor", "onDownloadComplete imageUrl = " + this.f + " imagePath = " + this.c + this.d);
try {
file = new File(this.c + this.d);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "onDownloadComplete error", e);
}
file = null;
}
if (file != null && file.isFile() && file.exists()) {
af.a("CommonImageLoaderRefactor", "onDownloadComplete file size = " + file.length());
} else {
af.b("CommonImageLoaderRefactor", "onDownloadComplete file not exist");
}
}
this.a.execute(new Runnable() { // from class: com.mbridge.msdk.foundation.same.c.d.b.1
@Override // java.lang.Runnable
public final void run() {
b.a(b.this);
}
});
}
public static /* synthetic */ void a(b bVar) {
if (bVar.g == null) {
return;
}
try {
Bitmap d = d.d(bVar.c + bVar.d);
if (d == null) {
bVar.a("bitmap decode failed");
} else {
final Bitmap a = bVar.a(d, bVar.e);
if (a == null) {
bVar.a("bitmap transformation failed");
} else if (bVar.g != null) {
bVar.b.post(new Runnable() { // from class: com.mbridge.msdk.foundation.same.c.d.b.3
@Override // java.lang.Runnable
public final void run() {
try {
b.this.g.onSuccessLoad(a, b.this.f);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "callbackForSuccess error", e);
}
}
}
});
}
}
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.a("CommonImageLoaderRefactor", "onDownloadComplete decodeBitmap error = " + e.getLocalizedMessage());
}
bVar.a("bitmap decode failed");
}
}
}
public final void a(final String str, final g gVar, final c cVar) {
try {
this.a.execute(new Runnable() { // from class: com.mbridge.msdk.foundation.same.c.d.1
@Override // java.lang.Runnable
public final void run() {
DownloadRequest a2 = d.this.a(ad.c(str), str, gVar, cVar);
if (a2 == null) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "createDownloadRequest error");
}
if (cVar == null) {
return;
}
d.this.b.post(new Runnable() { // from class: com.mbridge.msdk.foundation.same.c.d.1.1
@Override // java.lang.Runnable
public final void run() {
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
cVar.onFailedLoad("create download request error", str);
}
});
return;
}
a2.start();
}
});
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonImageLoaderRefactor", "loadImage error", e);
}
}
}
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.foundation.same.c;
/* loaded from: classes4.dex */
public final class e {
public static boolean a(String str) {
return str == null || str.trim().length() == 0;
}
}

View File

@@ -0,0 +1,27 @@
package com.mbridge.msdk.foundation.same.c;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/* loaded from: classes4.dex */
public final class f {
private static ThreadPoolExecutor a;
public static ThreadPoolExecutor a() {
if (a == null) {
int availableProcessors = Runtime.getRuntime().availableProcessors();
a = new ThreadPoolExecutor(availableProcessors, availableProcessors, 10L, TimeUnit.MILLISECONDS, new LinkedBlockingDeque(), new ThreadFactory() { // from class: com.mbridge.msdk.foundation.same.c.f.1
@Override // java.util.concurrent.ThreadFactory
public final Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable);
thread.setName("mb-image-loader-thread");
return thread;
}
}, new ThreadPoolExecutor.DiscardPolicy());
}
a.allowCoreThreadTimeOut(true);
return a;
}
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.foundation.same.c;
import android.graphics.Bitmap;
/* loaded from: classes4.dex */
public interface g {
Bitmap a(Bitmap bitmap) throws Exception;
}