正在查看: FanCode v7.24.0 应用的 ProxyBillingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FanCode v7.24.0 应用的 ProxyBillingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.android.billingclient.api;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.os.ResultReceiver;
import androidx.annotation.NonNull;
import com.google.android.apps.common.proguard.UsedByReflection;
import com.google.android.gms.internal.play_billing.zzb;
import com.newrelic.agent.android.api.v2.TraceFieldInterface;
import com.newrelic.agent.android.background.ApplicationStateMonitor;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.tracing.Trace;
import com.newrelic.agent.android.tracing.TraceMachine;
import java.util.ArrayList;
@UsedByReflection("PlatformActivityProxy")
@Instrumented
public class ProxyBillingActivity extends Activity implements TraceFieldInterface {
private ResultReceiver f8413a;
private ResultReceiver f8414b;
private boolean f8415c;
private boolean f8416d;
public Trace f8417e;
private Intent a(String str) {
Intent intent = new Intent("com.android.vending.billing.ALTERNATIVE_BILLING");
intent.setPackage(getApplicationContext().getPackageName());
intent.putExtra("ALTERNATIVE_BILLING_USER_CHOICE_DATA", str);
return intent;
}
private Intent b() {
Intent intent = new Intent("com.android.vending.billing.LOCAL_BROADCAST_PURCHASES_UPDATED");
intent.setPackage(getApplicationContext().getPackageName());
return intent;
}
@Override
protected void onActivityResult(int r8, int r9, android.content.Intent r10) {
throw new UnsupportedOperationException("Method not decompiled: com.android.billingclient.api.ProxyBillingActivity.onActivityResult(int, int, android.content.Intent):void");
}
@Override
protected void onCreate(Bundle bundle) {
int i9;
PendingIntent pendingIntent;
int i10;
TraceMachine.startTracing("ProxyBillingActivity");
try {
TraceMachine.enterMethod(this.f8417e, "ProxyBillingActivity#onCreate", (ArrayList) null);
} catch (NoSuchFieldError unused) {
TraceMachine.enterMethod((Trace) null, "ProxyBillingActivity#onCreate", (ArrayList) null);
}
super.onCreate(bundle);
if (bundle != null) {
zzb.zzj("ProxyBillingActivity", "Launching Play Store billing flow from savedInstanceState");
this.f8415c = bundle.getBoolean("send_cancelled_broadcast_if_finished", false);
if (bundle.containsKey("result_receiver")) {
this.f8413a = (ResultReceiver) bundle.getParcelable("result_receiver");
} else if (bundle.containsKey("in_app_message_result_receiver")) {
this.f8414b = (ResultReceiver) bundle.getParcelable("in_app_message_result_receiver");
}
this.f8416d = bundle.getBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", false);
TraceMachine.exitMethod();
return;
}
zzb.zzj("ProxyBillingActivity", "Launching Play Store billing flow");
if (getIntent().hasExtra("BUY_INTENT")) {
pendingIntent = (PendingIntent) getIntent().getParcelableExtra("BUY_INTENT");
if (getIntent().hasExtra("IS_FLOW_FROM_FIRST_PARTY_CLIENT") && getIntent().getBooleanExtra("IS_FLOW_FROM_FIRST_PARTY_CLIENT", false)) {
this.f8416d = true;
i10 = 110;
i9 = i10;
}
i9 = 100;
} else if (getIntent().hasExtra("SUBS_MANAGEMENT_INTENT")) {
pendingIntent = (PendingIntent) getIntent().getParcelableExtra("SUBS_MANAGEMENT_INTENT");
this.f8413a = (ResultReceiver) getIntent().getParcelableExtra("result_receiver");
i9 = 100;
} else if (getIntent().hasExtra("IN_APP_MESSAGE_INTENT")) {
pendingIntent = (PendingIntent) getIntent().getParcelableExtra("IN_APP_MESSAGE_INTENT");
this.f8414b = (ResultReceiver) getIntent().getParcelableExtra("in_app_message_result_receiver");
i10 = 101;
i9 = i10;
} else {
i9 = 100;
pendingIntent = null;
}
try {
this.f8415c = true;
startIntentSenderForResult(pendingIntent.getIntentSender(), i9, new Intent(), 0, 0, 0);
TraceMachine.exitMethod();
} catch (IntentSender.SendIntentException e9) {
zzb.zzl("ProxyBillingActivity", "Got exception while trying to start a purchase flow.", e9);
ResultReceiver resultReceiver = this.f8413a;
if (resultReceiver != null) {
resultReceiver.send(6, null);
} else {
ResultReceiver resultReceiver2 = this.f8414b;
if (resultReceiver2 != null) {
resultReceiver2.send(0, null);
} else {
Intent b9 = b();
if (this.f8416d) {
b9.putExtra("IS_FIRST_PARTY_PURCHASE", true);
}
b9.putExtra("RESPONSE_CODE", 6);
b9.putExtra("DEBUG_MESSAGE", "An internal error occurred.");
sendBroadcast(b9);
}
}
this.f8415c = false;
finish();
TraceMachine.exitMethod();
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if (isFinishing() && this.f8415c) {
Intent b9 = b();
b9.putExtra("RESPONSE_CODE", 1);
b9.putExtra("DEBUG_MESSAGE", "Billing dialog closed.");
sendBroadcast(b9);
}
}
@Override
protected void onSaveInstanceState(@NonNull Bundle bundle) {
super.onSaveInstanceState(bundle);
ResultReceiver resultReceiver = this.f8413a;
if (resultReceiver != null) {
bundle.putParcelable("result_receiver", resultReceiver);
}
ResultReceiver resultReceiver2 = this.f8414b;
if (resultReceiver2 != null) {
bundle.putParcelable("in_app_message_result_receiver", resultReceiver2);
}
bundle.putBoolean("send_cancelled_broadcast_if_finished", this.f8415c);
bundle.putBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", this.f8416d);
}
@Override
protected void onStart() {
super.onStart();
ApplicationStateMonitor.getInstance().activityStarted();
}
@Override
protected void onStop() {
super.onStop();
ApplicationStateMonitor.getInstance().activityStopped();
}
}