导航菜单

页面标题

页面副标题

RummyCircle v11000.89 - UpiAppsSelectionDialogActivity.java 源代码

正在查看: RummyCircle v11000.89 应用的 UpiAppsSelectionDialogActivity.java JAVA 源代码文件

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


package com.phonepe.intent.sdk.ui;

import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.widget.GridView;
import android.widget.ListAdapter;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.phonepe.intent.sdk.api.TransactionRequest;
import gvumm.f;
import npzhg.m;
import wlgrx.h;
import wlgrx.n;
import wlgrx.o;

public class UpiAppsSelectionDialogActivity extends Activity implements m, DialogInterface.OnKeyListener, DialogInterface.OnCancelListener {
    public chmha.a a;
    public TransactionRequest b;
    public o c;
    public krrvc.d d;
    public a e;
    public f f;
    public chmha.c g;

    public class a extends Dialog {
        @Override
        public final void show() {
            Window window = getWindow();
            window.setGravity(80);
            window.setLayout(-1, -2);
            super.show();
        }
    }

    public static AlphaAnimation a(int i, @NonNull View view) {
        AlphaAnimation alphaAnimation = new AlphaAnimation(0.5f, 1.0f);
        AlphaAnimation alphaAnimation2 = new AlphaAnimation(1.0f, 0.5f);
        long j = 450;
        alphaAnimation.setDuration(j);
        long j2 = i;
        alphaAnimation.setStartOffset(j2);
        alphaAnimation.setAnimationListener(new oohtx.c(view, alphaAnimation2));
        alphaAnimation2.setDuration(j);
        alphaAnimation2.setStartOffset(j2);
        alphaAnimation2.setAnimationListener(new oohtx.d(view, alphaAnimation));
        return alphaAnimation;
    }

    public final void d(String str) {
        f fromJsonString = h.fromJsonString(str, this.a, f.class);
        this.f = fromJsonString;
        if (fromJsonString == null) {
            n e = this.g.e("SDK_NETWORK_ERROR");
            e.b(str, "errorMessage");
            this.g.a(e);
            Intent intent = new Intent();
            intent.putExtra("key_txn_result", this.a.a("NETWORK_ERROR").toJsonString());
            setResult(0, intent);
            finish();
            return;
        }
        this.g.a(this.g.e("SDK_TRANSACTION_TOKEN_RECEIVED"));
        this.e.findViewById(com.phonepe.intent.sdk.b.loading_animation).setVisibility(8);
        this.f.a();
        if (this.f.a().isEmpty()) {
            this.e.findViewById(com.phonepe.intent.sdk.b.error_container).setVisibility(0);
            return;
        }
        ((TextView) this.e.findViewById(com.phonepe.intent.sdk.b.pay_via_text_view)).setText(com.phonepe.intent.sdk.d.pay_via);
        GridView gridView = (GridView) this.e.findViewById(com.phonepe.intent.sdk.b.gridview);
        gridView.setVisibility(0);
        gridView.setAdapter((ListAdapter) new adjic.b(this, this.f, this.a, this.e));
    }

    public final void m(int i, String str) {
        n e = this.g.e("SDK_NETWORK_ERROR");
        e.b(str, "errorMessage");
        this.g.a(e);
        this.e.findViewById(com.phonepe.intent.sdk.b.loading_animation).setVisibility(8);
        this.e.findViewById(com.phonepe.intent.sdk.b.error_container).setVisibility(0);
        ((TextView) this.e.findViewById(com.phonepe.intent.sdk.b.error_message)).setText(com.phonepe.intent.sdk.d.error_message);
    }

    @Override
    public final void onActivityResult(int i, int i2, Intent intent) {
        if (i == 1234) {
            setResult(i2, intent);
            finish();
        }
    }

    @Override
    public final void onBackPressed() {
        a aVar = this.e;
        if (aVar != null) {
            aVar.dismiss();
        }
        n e = this.g.e("SDK_NETWORK_ERROR");
        e.b("SDK_BACK_BUTTON_CLICKED", "errorMessage");
        this.g.a(e);
        Intent intent = new Intent();
        intent.putExtra("key_txn_result", this.a.a("USER_CANCEL").toJsonString());
        setResult(0, intent);
        finish();
    }

    @Override
    public final void onCancel(DialogInterface dialogInterface) {
        onBackPressed();
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle != null) {
            this.a = bundle.getParcelable("data_factory");
            this.f = bundle.getParcelable("redirect_response");
            this.b = (TransactionRequest) bundle.getParcelable("request");
            this.c = bundle.getParcelable("sdk_context");
            this.g = this.a.c(chmha.c.class);
            this.d = this.a.c(krrvc.d.class);
            return;
        }
        if (getIntent() == null || getIntent().getExtras() == null || this.f != null) {
            return;
        }
        chmha.a parcelableExtra = getIntent().getParcelableExtra("data_factory");
        this.a = parcelableExtra;
        this.g = parcelableExtra.c(chmha.c.class);
        a aVar = new a(this, com.phonepe.intent.sdk.e.phonepeThemeInvisible);
        this.e = aVar;
        aVar.setContentView(com.phonepe.intent.sdk.c.upi_apps_dialog_layout);
        this.e.setCancelable(true);
        this.e.setOnCancelListener(this);
        this.e.setOnKeyListener(this);
        this.e.getWindow().getAttributes().windowAnimations = com.phonepe.intent.sdk.e.DialogAnimation;
        ((TextView) this.e.findViewById(com.phonepe.intent.sdk.b.pay_via_text_view)).setText(com.phonepe.intent.sdk.d.getting_apps);
        a aVar2 = this.e;
        View findViewById = aVar2.findViewById(com.phonepe.intent.sdk.b.circle_one);
        View findViewById2 = aVar2.findViewById(com.phonepe.intent.sdk.b.circle_two);
        View findViewById3 = aVar2.findViewById(com.phonepe.intent.sdk.b.circle_three);
        View findViewById4 = aVar2.findViewById(com.phonepe.intent.sdk.b.circle_four);
        findViewById.startAnimation(a(0, findViewById));
        findViewById2.startAnimation(a(150, findViewById2));
        findViewById3.startAnimation(a(300, findViewById3));
        findViewById4.startAnimation(a(450, findViewById4));
        this.e.show();
        this.d = this.a.c(krrvc.d.class);
        this.b = (TransactionRequest) getIntent().getParcelableExtra("request");
        o parcelableExtra2 = getIntent().getParcelableExtra("sdk_context");
        this.c = parcelableExtra2;
        this.d.a(this.b, parcelableExtra2, this);
        n e = this.g.e("SDK_UPI_APP_SELECTION_ACTIVITY_STARTED");
        e.b(uauho.d.a, "sdkFlowType");
        this.g.a(e);
    }

    @Override
    public final boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
        if (i != 4) {
            return false;
        }
        onBackPressed();
        return true;
    }

    @Override
    public final void onRestoreInstanceState(Bundle bundle) {
        super.onRestoreInstanceState(bundle);
        this.a = bundle.getParcelable("data_factory");
        this.f = bundle.getParcelable("redirect_response");
        this.b = (TransactionRequest) bundle.getParcelable("request");
        this.c = bundle.getParcelable("sdk_context");
        this.g = this.a.c(chmha.c.class);
        this.d = this.a.c(krrvc.d.class);
    }

    @Override
    public final void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putParcelable("sdk_context", this.c);
        bundle.putParcelable("data_factory", this.a);
        bundle.putParcelable("redirect_response", this.f);
        bundle.putParcelable("request", this.b);
    }

    @Override
    public final boolean onTouchEvent(MotionEvent motionEvent) {
        return true;
    }
}