- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
59 lines
2.8 KiB
Java
59 lines
2.8 KiB
Java
package com.fyber.inneractive.sdk.mraid;
|
|
|
|
import android.app.Activity;
|
|
import android.app.AlertDialog;
|
|
import android.content.Context;
|
|
import android.content.DialogInterface;
|
|
import android.os.Environment;
|
|
import com.facebook.share.internal.ShareConstants;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import com.fyber.inneractive.sdk.network.l0;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import com.fyber.inneractive.sdk.util.p0;
|
|
import java.io.File;
|
|
import java.util.LinkedHashMap;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class r extends a {
|
|
public r(LinkedHashMap linkedHashMap, com.fyber.inneractive.sdk.web.j jVar, p0 p0Var) {
|
|
super(linkedHashMap, jVar, p0Var);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.mraid.b
|
|
public final void a() {
|
|
String b = b(ShareConstants.MEDIA_URI);
|
|
if (b != null) {
|
|
String str = "";
|
|
if (!"".equals(b)) {
|
|
com.fyber.inneractive.sdk.web.j jVar = this.c;
|
|
Context l = jVar.l();
|
|
try {
|
|
str = Environment.getExternalStorageState();
|
|
} catch (Throwable unused) {
|
|
}
|
|
if (!"mounted".equals(str) || com.fyber.inneractive.sdk.util.o.a.checkCallingOrSelfPermission("android.permission.WRITE_EXTERNAL_STORAGE") != 0) {
|
|
jVar.a(g.STORE_PICTURE, "Error downloading file - the device does not have an SD card mounted, or the Android permission is not granted.");
|
|
IAlog.a("Error downloading file. Please check if the Android permission is not granted, or maybe the device does not have an SD card mounted? ", new Object[0]);
|
|
return;
|
|
}
|
|
if (l instanceof Activity) {
|
|
new AlertDialog.Builder(jVar.l()).setTitle("Save Image").setMessage("Download image to Picture gallery?").setNegativeButton("Cancel", (DialogInterface.OnClickListener) null).setPositiveButton("Okay", new com.fyber.inneractive.sdk.web.r(jVar, b)).setCancelable(true).show();
|
|
return;
|
|
}
|
|
com.fyber.inneractive.sdk.util.p.b.post(new com.fyber.inneractive.sdk.web.o("Downloading image to Picture gallery..."));
|
|
new File(Environment.getExternalStorageDirectory(), "Pictures").mkdirs();
|
|
com.fyber.inneractive.sdk.flow.q qVar = jVar.s;
|
|
IAConfigManager.L.r.a(new l0(new com.fyber.inneractive.sdk.web.q(jVar), b, qVar != null ? qVar.c : null));
|
|
return;
|
|
}
|
|
}
|
|
this.c.a(g.STORE_PICTURE, "Image can't be stored with null or empty URL");
|
|
IAlog.a("Mraid Store Picture -Invalid URI ", new Object[0]);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.mraid.a
|
|
public final String c() {
|
|
return b(ShareConstants.MEDIA_URI);
|
|
}
|
|
}
|