正在查看: Crafto v9.3.3 应用的 UpiAppsSelectionDialogActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 UpiAppsSelectionDialogActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.phonepe.intent.sdk.ui;
import Xn.j;
import Xn.n;
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 co.b;
import com.phonepe.intent.sdk.api.TransactionRequest;
import fo.e;
import fo.f;
import jmjou.jmjou;
import oi.c;
import rmqfk.qwsnv;
import rmqfk.uauho;
import wlgrx.npzhg;
import xl.d;
public class UpiAppsSelectionDialogActivity extends Activity implements n, DialogInterface.OnKeyListener, DialogInterface.OnCancelListener {
public jmjou a;
public TransactionRequest b;
public uauho c;
public j d;
public a e;
public npzhg f;
public d 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 e(view, alphaAnimation2));
alphaAnimation2.setDuration(j);
alphaAnimation2.setStartOffset(j2);
alphaAnimation2.setAnimationListener(new f(view, alphaAnimation));
return alphaAnimation;
}
public final void b(String str) {
npzhg fromJsonString = b.fromJsonString(str, this.a, npzhg.class);
this.f = fromJsonString;
if (fromJsonString == null) {
qwsnv b = this.g.b("SDK_NETWORK_ERROR");
b.b(str, "errorMessage");
this.g.a(b);
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.b("SDK_TRANSACTION_TOKEN_RECEIVED"));
this.e.findViewById(oi.b.loading_animation).setVisibility(8);
this.f.a();
if (this.f.a().isEmpty()) {
this.e.findViewById(oi.b.error_container).setVisibility(0);
return;
}
((TextView) this.e.findViewById(oi.b.pay_via_text_view)).setText(oi.d.pay_via);
GridView gridView = (GridView) this.e.findViewById(oi.b.gridview);
gridView.setVisibility(0);
gridView.setAdapter((ListAdapter) new Gl.b(this, this.f, this.a, this.e));
}
public final void m(int i, String str) {
qwsnv b = this.g.b("SDK_NETWORK_ERROR");
b.b(str, "errorMessage");
this.g.a(b);
this.e.findViewById(oi.b.loading_animation).setVisibility(8);
this.e.findViewById(oi.b.error_container).setVisibility(0);
((TextView) this.e.findViewById(oi.b.error_message)).setText(oi.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();
}
qwsnv b = this.g.b("SDK_NETWORK_ERROR");
b.b("SDK_BACK_BUTTON_CLICKED", "errorMessage");
this.g.a(b);
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.d(d.class);
this.d = this.a.d(j.class);
return;
}
if (getIntent() == null || getIntent().getExtras() == null || this.f != null) {
return;
}
jmjou parcelableExtra = getIntent().getParcelableExtra("data_factory");
this.a = parcelableExtra;
this.g = parcelableExtra.d(d.class);
a aVar = new a(this, oi.e.phonepeThemeInvisible);
this.e = aVar;
aVar.setContentView(c.upi_apps_dialog_layout);
this.e.setCancelable(true);
this.e.setOnCancelListener(this);
this.e.setOnKeyListener(this);
this.e.getWindow().getAttributes().windowAnimations = oi.e.DialogAnimation;
((TextView) this.e.findViewById(oi.b.pay_via_text_view)).setText(oi.d.getting_apps);
a aVar2 = this.e;
View findViewById = aVar2.findViewById(oi.b.circle_one);
View findViewById2 = aVar2.findViewById(oi.b.circle_two);
View findViewById3 = aVar2.findViewById(oi.b.circle_three);
View findViewById4 = aVar2.findViewById(oi.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.d(j.class);
this.b = (TransactionRequest) getIntent().getParcelableExtra("request");
uauho parcelableExtra2 = getIntent().getParcelableExtra("sdk_context");
this.c = parcelableExtra2;
this.d.a(this.b, parcelableExtra2, this);
qwsnv b = this.g.b("SDK_UPI_APP_SELECTION_ACTIVITY_STARTED");
b.b(xl.f.irjuc, "sdkFlowType");
this.g.a(b);
}
@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.d(d.class);
this.d = this.a.d(j.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;
}
}