正在查看: Clash Legends v0.0.1 应用的 PaymentActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 PaymentActivity.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 android.util.Log;
import android.widget.TextView;
import com.paypal.android.sdk.fu;
import com.paypal.android.sdk.fw;
import com.paypal.android.sdk.gn;
import com.paypal.android.sdk.gq;
import com.paypal.android.sdk.gr;
import com.paypal.android.sdk.gs;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
public final class PaymentActivity extends Activity {
public static final String EXTRA_PAYMENT = "com.paypal.android.sdk.payment";
public static final String EXTRA_RESULT_CONFIRMATION = "com.paypal.android.sdk.paymentConfirmation";
public static final int RESULT_EXTRAS_INVALID = 2;
private static final String a = PaymentActivity.class.getSimpleName();
private Timer b;
private Date c;
private PayPalService d;
private final ServiceConnection e = new ck(this);
private boolean f;
public void b() {
PaymentMethodActivity.a(this, 1, this.d.d());
}
public ce c() {
return new cm(this);
}
static void c(PaymentActivity paymentActivity) {
if (paymentActivity.d.d() == null) {
Log.e(a, "Service state invalid. Did you start the PayPalService?");
paymentActivity.setResult(2);
paymentActivity.finish();
return;
}
co coVar = new co(paymentActivity.getIntent(), paymentActivity.d.d());
if (!coVar.b()) {
Log.e(a, "Service extras invalid. Please see the docs.");
paymentActivity.setResult(2);
paymentActivity.finish();
} else {
if (!coVar.c()) {
Log.e(a, "Extras invalid. Please see the docs.");
paymentActivity.setResult(2);
paymentActivity.finish();
return;
}
paymentActivity.d.l();
paymentActivity.d.c().a();
if (paymentActivity.d.i()) {
paymentActivity.b();
return;
}
Calendar calendar = Calendar.getInstance();
calendar.add(13, 1);
paymentActivity.c = calendar.getTime();
paymentActivity.d.a(paymentActivity.c(), false);
}
}
@Override
public final void finish() {
super.finish();
new StringBuilder().append(a).append(".finish");
}
@Override
protected final void onActivityResult(int i, int i2, Intent intent) {
String str;
super.onActivityResult(i, i2, intent);
StringBuilder sb = new StringBuilder();
String str2 = a;
sb.append(str2).append(".onActivityResult");
if (i == 1) {
switch (i2) {
case -1:
if (intent != null) {
PaymentConfirmation paymentConfirmation = (PaymentConfirmation) intent.getParcelableExtra(EXTRA_RESULT_CONFIRMATION);
if (paymentConfirmation != null) {
Intent intent2 = new Intent();
intent2.putExtra(EXTRA_RESULT_CONFIRMATION, paymentConfirmation);
setResult(-1, intent2);
break;
} else {
str = "result was OK, have data, but no payment state in bundle, oops";
}
} else {
str = "result was OK, no intent data, oops";
}
Log.e(str2, str);
break;
case 0:
break;
default:
Log.wtf("paypal.sdk", "unexpected request code " + i + " call it a cancel");
break;
}
}
finish();
}
@Override
protected final void onCreate(Bundle bundle) {
super.onCreate(bundle);
new StringBuilder().append(a).append(".onCreate");
new gs(this).a();
new gr(this).a();
new gq(this).a(Arrays.asList(PaymentActivity.class.getName(), LoginActivity.class.getName(), PaymentMethodActivity.class.getName(), PaymentConfirmActivity.class.getName()));
this.f = bindService(d.b(this), this.e, 1);
setTheme(R.style.Theme.Holo.Light);
requestWindowFeature(8);
gn gnVar = new gn(this);
setContentView(gnVar.a);
gnVar.b.setText(fu.a(fw.CHECKING_DEVICE));
d.a(this, (TextView) null, fw.CHECKING_DEVICE);
}
@Override
protected final Dialog onCreateDialog(int i, Bundle bundle) {
switch (i) {
case 2:
return d.a(this, new cj(this));
case 3:
return d.a(this, fw.UNAUTHORIZED_MERCHANT_TITLE, bundle, i);
default:
return d.a(this, fw.UNAUTHORIZED_DEVICE_TITLE, bundle, i);
}
}
@Override
protected final void onDestroy() {
new StringBuilder().append(a).append(".onDestroy");
PayPalService payPalService = this.d;
if (payPalService != null) {
payPalService.o();
this.d.u();
}
if (this.f) {
unbindService(this.e);
this.f = false;
}
super.onDestroy();
}
}