正在查看: Crafto v9.3.3 应用的 ResultActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 ResultActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.paytmpayments.customuisdk.dataSource.utils;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.paytmpayments.customuisdk.app.CheckLoggedInUserMatchListener;
import com.paytmpayments.customuisdk.base.CallbackListener;
import com.paytmpayments.customuisdk.base.DependencyProvider;
import com.paytmpayments.customuisdk.base.EventLogger;
import com.paytmpayments.customuisdk.base.MerchantHelper;
import com.paytmpayments.customuisdk.common.Constants.SDKConstants;
import com.paytmpayments.customuisdk.dataSource.PaytmPaymentsUtilRepository;
import com.paytmpayments.customuisdk.dataSource.models.UpiIntentRequestModel;
import com.paytmpayments.customuisdk.transaction.PayUtility;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
@Metadata
public final class ResultActivity extends AppCompatActivity {
public static final int APP_INVOKE = 191;
@NotNull
public static final Companion Companion = new Companion(null);
public static final int UPI_INTENT = 187;
private static ResultActivity activityInstance;
@NotNull
public Map<Integer, View> _$_findViewCache = new LinkedHashMap();
private final String amount;
private final CheckLoggedInUserMatchListener checkUserMatchListener;
private final MerchantHelper merchantHelper;
private final String mid;
private final String orderID;
private final CallbackListener sdkListener;
private final String token;
@Metadata
public static final class Companion {
private Companion() {
}
public final ResultActivity getActivityInstance() {
return ResultActivity.activityInstance;
}
public final void killActivity() {
AppCompatActivity activityInstance = getActivityInstance();
if (activityInstance != null) {
activityInstance.finish();
}
setActivityInstance(null);
}
public final void setActivityInstance(ResultActivity resultActivity) {
ResultActivity.activityInstance = resultActivity;
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
public ResultActivity() {
MerchantHelper merchantHelper = DependencyProvider.getMerchantHelper();
this.mid = merchantHelper != null ? merchantHelper.getMid() : null;
MerchantHelper merchantHelper2 = DependencyProvider.getMerchantHelper();
this.orderID = merchantHelper2 != null ? merchantHelper2.getOrderId() : null;
MerchantHelper merchantHelper3 = DependencyProvider.getMerchantHelper();
this.token = merchantHelper3 != null ? merchantHelper3.getToken() : null;
MerchantHelper merchantHelper4 = DependencyProvider.getMerchantHelper();
this.amount = merchantHelper4 != null ? merchantHelper4.getAmount() : null;
this.merchantHelper = DependencyProvider.getMerchantHelper();
this.checkUserMatchListener = PaytmPaymentsUtilRepository.INSTANCE.getCheckLoggedInUserMatchListener$data_release();
this.sdkListener = DependencyProvider.getCallbackListener();
}
private final void checkForNullCases() {
CallbackListener callbackListener;
String str;
MerchantHelper merchantHelper;
String str2;
MerchantHelper merchantHelper2;
String str3;
MerchantHelper merchantHelper3;
String str4;
MerchantHelper merchantHelper4;
MerchantHelper merchantHelper5;
if (DependencyProvider.getMerchantHelper() == null && (merchantHelper5 = this.merchantHelper) != null) {
DependencyProvider.setMerchantHelper(merchantHelper5);
}
MerchantHelper merchantHelper6 = DependencyProvider.getMerchantHelper();
if ((merchantHelper6 != null ? merchantHelper6.getMid() : null) == null && (str4 = this.mid) != null && (merchantHelper4 = DependencyProvider.getMerchantHelper()) != null) {
merchantHelper4.setMid(str4);
}
MerchantHelper merchantHelper7 = DependencyProvider.getMerchantHelper();
if ((merchantHelper7 != null ? merchantHelper7.getOrderId() : null) == null && (str3 = this.orderID) != null && (merchantHelper3 = DependencyProvider.getMerchantHelper()) != null) {
merchantHelper3.setOrderId(str3);
}
MerchantHelper merchantHelper8 = DependencyProvider.getMerchantHelper();
if ((merchantHelper8 != null ? merchantHelper8.getToken() : null) == null && (str2 = this.token) != null && (merchantHelper2 = DependencyProvider.getMerchantHelper()) != null) {
merchantHelper2.setTxnToken(str2);
}
MerchantHelper merchantHelper9 = DependencyProvider.getMerchantHelper();
if ((merchantHelper9 != null ? merchantHelper9.getAmount() : null) == null && (str = this.amount) != null && (merchantHelper = DependencyProvider.getMerchantHelper()) != null) {
merchantHelper.setAmount(str);
}
if (DependencyProvider.getCallbackListener() != null || (callbackListener = this.sdkListener) == null) {
return;
}
DependencyProvider.setCallbackListener(callbackListener);
}
private final void initTransaction() {
int intExtra = getIntent().getIntExtra("payType", 0);
if (intExtra != 187) {
if (intExtra != 191) {
return;
}
PaymentUtility.INSTANCE.openPaytmAppForAddMoneyToWallet(this);
return;
}
ActivityInfo activityInfo = (ActivityInfo) getIntent().getParcelableExtra("activityInfo");
if (activityInfo != null) {
String stringExtra = getIntent().getStringExtra(PayUtility.PAYMENT_FLOW);
if (stringExtra == null) {
stringExtra = "";
}
String stringExtra2 = getIntent().getStringExtra("selectedAppName");
PaymentUtility.INSTANCE.startTransaction(this, new UpiIntentRequestModel(stringExtra, stringExtra2 != null ? stringExtra2 : "", activityInfo));
}
}
private final boolean invokePaytmAppToCompareUsers() {
try {
Intent intent = new Intent();
intent.putExtra(SDKConstants.KEY_USER_MOBILE_HASH, getIntent().getStringExtra(SDKConstants.KEY_USER_MOBILE_HASH));
intent.setComponent(new ComponentName(SDKConstants.PAYTM_APP_PACKAGE, SDKConstants.USER_MATCH_PAYTM_ACTIVITY));
startActivityForResult(intent, 12);
return true;
} catch (Exception unused) {
return false;
}
}
private final void sendUpiPushEvent(int i, HashMap<String, String> hashMap) {
EventLogger eventLogger;
String str = i != 187 ? i != 191 ? "" : SDKConstants.ACTION_APP_INVOKE : SDKConstants.ACTION_UPI_INTENT;
if (Intrinsics.areEqual(str, "") || (eventLogger = DependencyProvider.getEventLogger()) == null) {
return;
}
eventLogger.sendLogs(SDKConstants.CUI_EVENT_CATEGORY, str, hashMap);
}
public void _$_clearFindViewByIdCache() {
this._$_findViewCache.clear();
}
public View _$_findCachedViewById(int i) {
Map<Integer, View> map = this._$_findViewCache;
View view = map.get(Integer.valueOf(i));
if (view != null) {
return view;
}
View findViewById = findViewById(i);
if (findViewById == null) {
return null;
}
map.put(Integer.valueOf(i), findViewById);
return findViewById;
}
public void onActivityResult(int r9, int r10, android.content.Intent r11) {
throw new UnsupportedOperationException("Method not decompiled: com.paytmpayments.customuisdk.dataSource.utils.ResultActivity.onActivityResult(int, int, android.content.Intent):void");
}
public void onCreate(Bundle bundle) {
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
setRequestedOrientation(Build.VERSION.SDK_INT == 26 ? -1 : 1);
activityInstance = this;
if (bundle != null) {
return;
}
if (!getIntent().getBooleanExtra(SDKConstants.CHECK_MOBILE_MATCH, false)) {
initTransaction();
return;
}
if (invokePaytmAppToCompareUsers()) {
return;
}
CheckLoggedInUserMatchListener checkLoggedInUserMatchListener = this.checkUserMatchListener;
if (checkLoggedInUserMatchListener != null) {
checkLoggedInUserMatchListener.getIfUserMatched(6);
}
activityInstance = null;
finish();
}
}