正在查看: Clash Legends v0.0.1 应用的 PaymentMethodActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 PaymentMethodActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.paypal.android.sdk.payments;
import android.R;
import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import com.paypal.android.sdk.fc;
import com.paypal.android.sdk.fu;
import com.paypal.android.sdk.fw;
import com.paypal.android.sdk.gf;
import java.util.Timer;
public final class PaymentMethodActivity extends Activity {
private static final String a = PaymentMethodActivity.class.getSimpleName();
private Timer b;
private boolean c;
private boolean d;
private boolean e;
private boolean f;
private gf g;
private cp h;
private PayPalService i;
private final ServiceConnection j = new dq(this);
private boolean k;
static void a(Activity activity, int i, PayPalConfiguration payPalConfiguration) {
Intent intent = new Intent(activity, (Class<?>) PaymentMethodActivity.class);
intent.putExtras(activity.getIntent());
intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, payPalConfiguration);
activity.startActivityForResult(intent, 1);
}
static void a(PaymentMethodActivity paymentMethodActivity) {
paymentMethodActivity.i.a(fc.SelectPayPalPayment);
PaymentConfirmActivity.a(paymentMethodActivity, 2, dh.PayPal, null, paymentMethodActivity.i.d(), true);
}
public void b() {
if (!this.e || this.d) {
return;
}
this.g.m.setImageBitmap(com.paypal.android.sdk.cz.c("iVBORw0KGgoAAAANSUhEUgAAADcAAAAsCAYAAADByiAeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAohJREFUeNrcWYGRgjAQJMwXQAl0IFbwWMFrBS8VvHYAFagVoBVIB2IFaAV8B08H/GUm/GA+CUouBL2ZTByEwCZ3m70LcRCsrusQutDBswranhBSOTYNgC1rM1ZA82yD+6nN2Urn21xNYAF0Jmf33Ro45DhDH9+1ObN3mMe84yVXTusd7ojjTds7iIzeoZtAU7mE1/E/5p536fj/yvbFb+VmDK2sn9c27b2RcKuVOs9vdJVnVN0QBsyHrjAQQ9RNMmhn5j5tC1g8zQ0A3AK4dbNqKbJ7nJjevIeYKN3HBpSOjy2h6DjznuxLQR4xpZvbYj4MX5+CO2S9aJvGCCEL+LnGEgBv2EEsWRXqIj4HJpeA3ML9FRq5IbhioEiHCsVz6V9s/H9WlwdiDHArSfycHpicpWSM0ia4UvJRRY+xlsiJcKwrnBPBtbSnLEt594b427O9cvisgL2cr6XobMobwbWdDXAitvvUTW8E5JTbAHcWXMOQUiHnHRcb4CrBXoYhBiYSjTooOH5GfSRB4I8BnI/xAV0eoTNxaOCUWfBjdh0DOFFsZAjgMkGtZnBCCTH3pIb2BewY2gDn8bkbU/q5xpgJ5t6pK7++BNcWHdUqmUV8GsQUj72irGD1KNvNHgQY8VJOIccGz+c8ybhxR9pyVOSCsW4+11S/asOZeMCIwWvdnyvuxygzJhgrh3pYiHiYqZ3P8XXI4t6SniTJ3WAWhjHBNUripKqNKNyQFoVXmB+DFXOqWDyw/tLEGItBCv6DpUkmTouSBlyJqOrHYlHjlocXA0Y9JGvAbSWpxrPajoaAy6mKVwBIDyHjG7ZkanyqKXxtu+IacEQ3bCmgZt8gixlhZdEBzK8AAwBIvuGtI5K/kgAAAABJRU5ErkJggg==", this));
this.g.m.setVisibility(0);
this.g.m.setContentDescription(fu.a(fw.SCAN_CARD_ICON_DESCRIPTION));
}
public void c() {
throw new UnsupportedOperationException("Method not decompiled: com.paypal.android.sdk.payments.PaymentMethodActivity.c():void");
}
static void c(PaymentMethodActivity paymentMethodActivity) {
paymentMethodActivity.i.a(fc.SelectCreditCardPayment);
com.paypal.android.sdk.dt s = paymentMethodActivity.i.s();
if (s != null && s.b()) {
PaymentConfirmActivity.a(paymentMethodActivity, 2, dh.CreditCardToken, null, paymentMethodActivity.i.d());
return;
}
String a2 = paymentMethodActivity.i.d().a();
Intent intent = new Intent(paymentMethodActivity, (Class<?>) d.a("io.card.payment.CardIOActivity"));
intent.putExtra(d.a("io.card.payment.CardIOActivity", "EXTRA_LANGUAGE_OR_LOCALE"), a2);
intent.putExtra(d.a("io.card.payment.CardIOActivity", "EXTRA_REQUIRE_EXPIRY"), true);
intent.putExtra(d.a("io.card.payment.CardIOActivity", "EXTRA_REQUIRE_CVV"), true);
new StringBuilder("startActivityForResult(").append(intent).append(", 1").append(")");
paymentMethodActivity.startActivityForResult(intent, 1);
}
private void d() {
this.k = bindService(d.b(this), this.j, 1);
}
static void i(PaymentMethodActivity paymentMethodActivity) {
if (!paymentMethodActivity.f) {
paymentMethodActivity.f = true;
paymentMethodActivity.i.a(fc.PaymentMethodWindow);
}
boolean z = !paymentMethodActivity.c && (!paymentMethodActivity.i.d().i() || paymentMethodActivity.i.s() == null);
new StringBuilder("autoAdvanceToPayPalConfirmIfLoggedIn: ").append(z);
if (!k.a(paymentMethodActivity, paymentMethodActivity.i) && ((!paymentMethodActivity.i.d().i() && !paymentMethodActivity.c) || (z && paymentMethodActivity.i.j() && paymentMethodActivity.i.c().g.a()))) {
paymentMethodActivity.showDialog(3);
paymentMethodActivity.c = true;
Timer timer = new Timer();
paymentMethodActivity.b = timer;
timer.schedule(new dn(paymentMethodActivity), 1000L);
paymentMethodActivity.c = true;
}
paymentMethodActivity.c();
}
@Override
protected final void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
new StringBuilder().append(a).append(".onActivityResult (requestCode: ").append(i).append(", resultCode: ").append(i2).append(")");
switch (i) {
case 1:
if (intent != null && intent.hasExtra(d.a("io.card.payment.CardIOActivity", "EXTRA_SCAN_RESULT"))) {
PaymentConfirmActivity.a(this, 2, dh.CreditCard, intent.getParcelableExtra(d.a("io.card.payment.CardIOActivity", "EXTRA_SCAN_RESULT")), (PayPalConfiguration) getIntent().getParcelableExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION), true);
break;
}
break;
case 2:
if (i2 != -1) {
if (i2 == 0) {
this.c = true;
break;
}
} else {
PaymentConfirmation paymentConfirmation = (PaymentConfirmation) intent.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);
Intent intent2 = new Intent();
intent2.putExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION, paymentConfirmation);
setResult(i2, intent2);
finish();
break;
}
break;
}
}
@Override
public final void onBackPressed() {
new StringBuilder().append(a).append(".onBackPressed");
PayPalService payPalService = this.i;
if (payPalService != null) {
payPalService.a(fc.PaymentMethodCancel);
}
Timer timer = this.b;
if (timer != null) {
timer.cancel();
}
super.onBackPressed();
}
@Override
protected final void onCreate(Bundle bundle) {
boolean z;
super.onCreate(bundle);
new StringBuilder().append(a).append(".onCreate");
setTheme(R.style.Theme.Holo.Light);
requestWindowFeature(8);
d();
this.g = new gf(this);
this.h = new cp(getIntent());
setContentView(this.g.a);
d.a(this, this.g.l, fw.YOUR_ORDER);
this.g.f.setText(fu.a(fw.PAY_WITH));
this.g.b.setText(fu.a(fw.LOG_OUT_BUTTON));
this.g.j.setOnClickListener(new dj(this));
this.g.b.setOnClickListener(new dk(this));
this.g.h.setOnClickListener(new dl(this));
this.g.k.setOnClickListener(new dm(this));
if (bundle == null) {
if (!d.a(this)) {
finish();
}
z = false;
} else {
this.c = bundle.getBoolean("PP_PreventAutoLogin");
z = bundle.getBoolean("PP_PageTrackingSent");
}
this.f = z;
this.b = null;
}
@Override
protected final Dialog onCreateDialog(int i, Bundle bundle) {
switch (i) {
case 1:
return d.a(this, fw.LOG_OUT, fw.CONFIRM_LOG_OUT, new Cdo(this));
case 2:
return d.a(this, fw.CLEAR_CC_ALERT_TITLE, fw.CONFIRM_CLEAR_CREDIT_CARD_INFO, new dp(this));
case 3:
return d.a(this, fw.AUTHENTICATING, fw.ONE_MOMENT);
default:
return null;
}
}
@Override
protected final void onDestroy() {
new StringBuilder().append(a).append(".onDestroy");
if (this.k) {
unbindService(this.j);
this.k = false;
}
super.onDestroy();
}
@Override
protected final void onRestart() {
super.onRestart();
d();
}
@Override
protected final void onResume() {
super.onResume();
new StringBuilder().append(a).append(".onResume");
if (this.i != null) {
c();
}
}
@Override
protected final void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
new StringBuilder().append(a).append(".onSaveInstanceState");
bundle.putBoolean("PP_PreventAutoLogin", this.c);
bundle.putBoolean("PP_PageTrackingSent", this.f);
}
@Override
public final void onWindowFocusChanged(boolean z) {
super.onWindowFocusChanged(z);
this.g.c.a();
}
}