导航菜单

页面标题

页面副标题

Vi App v10.18.0 - ResultActivity.java 源代码

正在查看: Vi App v10.18.0 应用的 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 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;
import org.jetbrains.annotations.Nullable;

@Metadata(d1 = {"\u0000\\\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u0000  2\u00020\u0001:\u0001 B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u000e\u001a\u00020\u000fH\u0002J\b\u0010\u0010\u001a\u00020\u000fH\u0002J\b\u0010\u0011\u001a\u00020\u0012H\u0002J\"\u0010\u0013\u001a\u00020\u000f2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00152\b\u0010\u0017\u001a\u0004\u0018\u00010\u0018H\u0014J\u0012\u0010\u0019\u001a\u00020\u000f2\b\u0010\u001a\u001a\u0004\u0018\u00010\u001bH\u0014J4\u0010\u001c\u001a\u00020\u000f2\u0006\u0010\u0014\u001a\u00020\u00152\"\u0010\u001d\u001a\u001e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u00040\u001ej\u000e\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u0004`\u001fH\u0002R\u0010\u0010\u0003\u001a\u0004\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u0007\u001a\u0004\u0018\u00010\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\t\u001a\u0004\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\n\u001a\u0004\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u000b\u001a\u0004\u0018\u00010\fX\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\r\u001a\u0004\u0018\u00010\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006!"}, d2 = {"Lcom/paytmpayments/customuisdk/dataSource/utils/ResultActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "()V", SDKConstants.KEY_AMOUNT, "", "checkUserMatchListener", "Lcom/paytmpayments/customuisdk/app/CheckLoggedInUserMatchListener;", "merchantHelper", "Lcom/paytmpayments/customuisdk/base/MerchantHelper;", SDKConstants.MID, "orderID", "sdkListener", "Lcom/paytmpayments/customuisdk/base/CallbackListener;", "token", "checkForNullCases", "", "initTransaction", "invokePaytmAppToCompareUsers", "", "onActivityResult", "requestCode", "", "resultCode", SDKConstants.DATA, "Landroid/content/Intent;", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "sendUpiPushEvent", "map", "Ljava/util/HashMap;", "Lkotlin/collections/HashMap;", "Companion", "data_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class ResultActivity extends AppCompatActivity {

    @NotNull
    public static final Companion INSTANCE = new Companion(null);

    @Nullable
    private static ResultActivity activityInstance;

    @NotNull
    public Map<Integer, View> _$_findViewCache = new LinkedHashMap();

    @Nullable
    private final String amount;

    @Nullable
    private final CheckLoggedInUserMatchListener checkUserMatchListener;

    @Nullable
    private final MerchantHelper merchantHelper;

    @Nullable
    private final String mid;

    @Nullable
    private final String orderID;

    @Nullable
    private final CallbackListener sdkListener;

    @Nullable
    private final String token;

    @Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0006\u0010\f\u001a\u00020\rR\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u001c\u0010\u0006\u001a\u0004\u0018\u00010\u0007X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\b\u0010\t\"\u0004\b\n\u0010\u000b¨\u0006\u000e"}, d2 = {"Lcom/paytmpayments/customuisdk/dataSource/utils/ResultActivity$Companion;", "", "()V", "APP_INVOKE", "", SDKConstants.UPI_INTENT, "activityInstance", "Lcom/paytmpayments/customuisdk/dataSource/utils/ResultActivity;", "getActivityInstance", "()Lcom/paytmpayments/customuisdk/dataSource/utils/ResultActivity;", "setActivityInstance", "(Lcom/paytmpayments/customuisdk/dataSource/utils/ResultActivity;)V", "killActivity", "", "data_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
    public static final class Companion {
        private Companion() {
        }

        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        @Nullable
        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(@Nullable ResultActivity resultActivity) {
            ResultActivity.activityInstance = resultActivity;
        }
    }

    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("paymentFlow");
            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 requestCode, HashMap<String, String> map) {
        EventLogger eventLogger;
        String str = requestCode != 187 ? requestCode != 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, map);
    }

    public void onActivityResult(int r9, int r10, @org.jetbrains.annotations.Nullable 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(@Nullable Bundle savedInstanceState) {
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(savedInstanceState);
        setRequestedOrientation(Build.VERSION.SDK_INT == 26 ? -1 : 1);
        activityInstance = this;
        if (savedInstanceState != 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();
    }
}