导航菜单

页面标题

页面副标题

Clash Legends v0.0.1 - PaymentActivity.java 源代码

正在查看: Clash Legends v0.0.1 应用的 PaymentActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.instamojo.android.activities;

import android.os.Bundle;
import android.view.MenuItem;
import androidx.appcompat.widget.Toolbar;
import com.instamojo.android.R;
import com.instamojo.android.helpers.Constants;
import com.instamojo.android.helpers.Logger;
import in.juspay.godel.browser.JuspayWebViewClient;
import in.juspay.godel.ui.JuspayBrowserFragment;
import in.juspay.godel.ui.JuspayWebView;

public class PaymentActivity extends BaseActivity {
    private static final String a = PaymentActivity.class.getSimpleName();
    private JuspayBrowserFragment b;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_payment_instamojo);
        setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
        String str = a;
        Logger.d(str, "Inflated XML");
        final Bundle bundleExtra = getIntent().getBundleExtra(Constants.PAYMENT_BUNDLE);
        if (bundleExtra == null) {
            Logger.e(str, "Payment bundle is Null");
            returnResult(0);
        } else {
            this.b = (JuspayBrowserFragment) getSupportFragmentManager().findFragmentById(R.id.juspay_browser_fragment);
            this.b.setupJuspayWebviewCallbackInterface(new JuspayBrowserFragment.JuspayWebviewCallback() {
                @Override
                public final void webviewReady() {
                    JuspayWebView webView = PaymentActivity.this.b.getWebView();
                    webView.setWebViewClient(new JuspayWebViewClient(webView, PaymentActivity.this.b));
                    PaymentActivity.this.b.startPaymentWithArguments(bundleExtra);
                }
            });
            Logger.d(str, "Loaded Fragment - " + this.b.getClass().getSimpleName());
        }
    }

    public boolean onOptionsItemSelected(MenuItem item) {
        if (item.getItemId() == 16908332) {
            onBackPressed();
        }
        return super.onOptionsItemSelected(item);
    }

    public void onBackPressed() {
        Logger.d(a, "Invoking Juspay Cancel Payment Handler");
        this.b.juspayBackPressedHandler(true);
    }
}