正在查看: OLX India v19.42.007 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OLX India v19.42.007 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.payu.nfc;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.nfc.NfcAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.appcompat.widget.AppCompatTextView;
import com.payu.nfc.tasks.a;
import com.payu.nfc.tasks.base.a;
import com.payu.nfc.view.NFCActivity;
import com.payu.ui.model.utils.SdkUiConstants;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.concurrent.Executor;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Lambda;
public final class c {
public static final c a = new c();
public static com.payu.nfc.utils.d b = com.payu.nfc.utils.d.FAILED;
public static final class a extends Lambda implements Function0 {
public final Context d;
public a(Context context) {
super(0);
this.d = context;
}
@Override
public Object invoke() {
if (!c.f(this.d)) {
Intent intent = new Intent("android.settings.NFC_SETTINGS");
Context context = this.d;
if (context != null) {
context.startActivity(intent);
}
}
return Unit.a;
}
}
public static final class b extends Lambda implements Function0 {
public static final b d = new b();
public b() {
super(0);
}
@Override
public Object invoke() {
return Unit.a;
}
}
public static final class C0082c implements a.InterfaceC0084a {
@Override
public void a() {
c.b = com.payu.nfc.utils.d.IN_PROGRESS;
}
@Override
public void a(String str) {
c.b = com.payu.nfc.utils.d.FAILED;
}
@Override
public void a(File file) {
Throwable th;
InputStreamReader inputStreamReader;
BufferedReader bufferedReader;
IOException e;
FileInputStream fileInputStream;
c.b = com.payu.nfc.utils.d.SUCCESS;
org.slf4j.a aVar = com.payu.nfc.utils.a.a;
FileInputStream fileInputStream2 = null;
String str = null;
r1 = null;
InputStreamReader inputStreamReader2 = null;
try {
fileInputStream = new FileInputStream(file);
try {
inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8");
try {
bufferedReader = new BufferedReader(inputStreamReader);
int i = 0;
while (true) {
try {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
i++;
if (!readLine.startsWith(SdkUiConstants.HASH) && readLine.trim().length() != 0 && !readLine.contains("http")) {
if (readLine.startsWith("\t") && str != null) {
com.payu.nfc.utils.a.b.put(str, readLine.replace("\t", "").trim());
} else if (readLine.startsWith("3")) {
str = org.apache.commons.lang3.h.f(readLine.toUpperCase()).replaceAll("9000$", "");
} else {
com.payu.nfc.utils.a.a.c("Encountered unexpected line in atr list: currentATR=" + str + " Line(" + i + ") = " + readLine);
}
}
} catch (IOException e2) {
e = e2;
inputStreamReader2 = inputStreamReader;
try {
throw new RuntimeException(e);
} catch (Throwable th2) {
th = th2;
inputStreamReader = inputStreamReader2;
fileInputStream2 = fileInputStream;
org.apache.commons.io.b.c(bufferedReader);
org.apache.commons.io.b.c(inputStreamReader);
org.apache.commons.io.b.b(fileInputStream2);
throw th;
}
} catch (Throwable th3) {
th = th3;
fileInputStream2 = fileInputStream;
org.apache.commons.io.b.c(bufferedReader);
org.apache.commons.io.b.c(inputStreamReader);
org.apache.commons.io.b.b(fileInputStream2);
throw th;
}
}
org.apache.commons.io.b.c(bufferedReader);
org.apache.commons.io.b.c(inputStreamReader);
org.apache.commons.io.b.b(fileInputStream);
if (Unit.a == null) {
c.b = com.payu.nfc.utils.d.FAILED;
}
} catch (IOException e3) {
e = e3;
bufferedReader = null;
} catch (Throwable th4) {
th = th4;
bufferedReader = null;
}
} catch (IOException e4) {
e = e4;
bufferedReader = null;
} catch (Throwable th5) {
th = th5;
inputStreamReader = null;
bufferedReader = null;
}
} catch (IOException e5) {
e = e5;
fileInputStream = null;
bufferedReader = null;
} catch (Throwable th6) {
th = th6;
inputStreamReader = null;
bufferedReader = null;
org.apache.commons.io.b.c(bufferedReader);
org.apache.commons.io.b.c(inputStreamReader);
org.apache.commons.io.b.b(fileInputStream2);
throw th;
}
}
}
public static final void a(Function0 function0, DialogInterface dialogInterface, int i) {
function0.invoke();
}
public static final void c(Function0 function0, DialogInterface dialogInterface, int i) {
function0.invoke();
}
public static final void d(Context context) {
a.h(context, "Allow NFC Access", "This app needs access to NFC to read card details.", new a(context), b.d);
}
public static final void e(Context context) {
com.payu.nfc.tasks.a aVar = new com.payu.nfc.tasks.a(context, new C0082c());
Executor executor = aVar.g;
Object[] copyOf = Arrays.copyOf(new String[]{"https://web-assets.payu.in/sdkAssets/smartcard_list.txt"}, 1);
if (aVar.b != a.c.PENDING) {
int ordinal = aVar.b.ordinal();
if (ordinal == 0) {
throw new IllegalStateException("Task is already in pending state");
}
if (ordinal == 1) {
throw new IllegalStateException("Cannot execute task: the task is already running.");
}
if (ordinal == 2) {
throw new IllegalStateException("Cannot execute task: the task has already been executed (a task can be executed only once)");
}
throw new NoWhenBranchMatchedException();
}
aVar.b = a.c.RUNNING;
a.InterfaceC0084a interfaceC0084a = aVar.j;
if (interfaceC0084a != null) {
interfaceC0084a.a();
}
a.d dVar = aVar.e;
dVar.getClass();
dVar.a = copyOf;
executor.execute(aVar.f);
}
public static final boolean f(Context context) {
NfcAdapter defaultAdapter = NfcAdapter.getDefaultAdapter(context);
return defaultAdapter != null && defaultAdapter.isEnabled();
}
public static final boolean g(Context context) {
return NfcAdapter.getDefaultAdapter(context) != null && b == com.payu.nfc.utils.d.SUCCESS;
}
public static final void i(Context context, com.payu.nfc.interfaces.a aVar) {
if (context == null) {
return;
}
i.b = aVar;
context.startActivity(new Intent(context, (Class<?>) NFCActivity.class));
}
public final void h(Context context, String str, String str2, final Function0 function0, final Function0 function02) {
View inflate = LayoutInflater.from(context).inflate(f.permission_dialog_layout, (ViewGroup) null);
AppCompatTextView findViewById = inflate.findViewById(e.dialogTitle);
AppCompatTextView findViewById2 = inflate.findViewById(e.dialogMessage);
findViewById.setText(str);
findViewById2.setText(str2);
new AlertDialog.Builder(context, h.PermissionDialogTheme).setView(inflate).setPositiveButton("Allow", new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
c.a(Function0.this, dialogInterface, i);
}
}).setNegativeButton("Don't Allow", new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
c.c(Function0.this, dialogInterface, i);
}
}).setCancelable(false).create().show();
}
}