正在查看: Clash Legends v0.0.1 应用的 PayPalFuturePaymentActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 PayPalFuturePaymentActivity.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 PayPalFuturePaymentActivity extends Activity {
public static final String EXTRA_RESULT_AUTHORIZATION = "com.paypal.android.sdk.authorization";
public static final int RESULT_EXTRAS_INVALID = 2;
private static final String a = PayPalFuturePaymentActivity.class.getSimpleName();
private Date b;
private Timer c;
private PayPalService d;
private final ServiceConnection e = new bl(this);
private boolean f;
public void b() {
FuturePaymentConsentActivity.a(this, 1, this.d.d());
}
public ce c() {
return new bn(this);
}
static void c(PayPalFuturePaymentActivity payPalFuturePaymentActivity) {
if (payPalFuturePaymentActivity.d.d() == null) {
Log.e(a, "Service state invalid. Did you start the PayPalService?");
payPalFuturePaymentActivity.setResult(2);
payPalFuturePaymentActivity.finish();
return;
}
bx bxVar = new bx(payPalFuturePaymentActivity.getIntent(), payPalFuturePaymentActivity.d.d(), false);
if (!bxVar.b()) {
Log.e(a, "Service extras invalid. Please see the docs.");
payPalFuturePaymentActivity.setResult(2);
payPalFuturePaymentActivity.finish();
} else if (!bxVar.c()) {
Log.e(a, "Extras invalid. Please see the docs.");
payPalFuturePaymentActivity.setResult(2);
payPalFuturePaymentActivity.finish();
} else {
if (payPalFuturePaymentActivity.d.i()) {
payPalFuturePaymentActivity.b();
return;
}
Calendar calendar = Calendar.getInstance();
calendar.add(13, 1);
payPalFuturePaymentActivity.b = calendar.getTime();
payPalFuturePaymentActivity.d.a(payPalFuturePaymentActivity.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) {
PayPalAuthorization payPalAuthorization = (PayPalAuthorization) intent.getParcelableExtra("com.paypal.android.sdk.authorization");
if (payPalAuthorization != null) {
Intent intent2 = new Intent();
intent2.putExtra("com.paypal.android.sdk.authorization", payPalAuthorization);
setResult(-1, intent2);
break;
} else {
str = "result was OK, have data, but no authorization state in bundle, oops";
}
} else {
str = "result was OK, no intent data, oops";
}
Log.e(str2, str);
break;
case 0:
break;
default:
Log.wtf(str2, "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(PayPalFuturePaymentActivity.class.getName(), LoginActivity.class.getName(), FuturePaymentInfoActivity.class.getName(), FuturePaymentConsentActivity.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 bk(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();
}
}