正在查看: Structured v2.5.8 应用的 ProxyBillingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Structured v2.5.8 应用的 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 com.google.android.gms.internal.play_billing.AbstractC1467m;
import com.revenuecat.purchases.amazon.purchasing.ProxyAmazonBillingActivity;
public class ProxyBillingActivity extends Activity {
public ResultReceiver f18394m;
public ResultReceiver f18395n;
public boolean f18396o;
public boolean f18397p;
public final Intent a() {
Intent intent = new Intent("com.android.vending.billing.PURCHASES_UPDATED");
intent.setPackage(getApplicationContext().getPackageName());
return intent;
}
@Override
public final void onActivityResult(int r12, int r13, android.content.Intent r14) {
throw new UnsupportedOperationException("Method not decompiled: com.android.billingclient.api.ProxyBillingActivity.onActivityResult(int, int, android.content.Intent):void");
}
@Override
public final void onCreate(Bundle bundle) {
int i6;
PendingIntent pendingIntent;
int i10;
super.onCreate(bundle);
if (bundle != null) {
AbstractC1467m.d("ProxyBillingActivity", "Launching Play Store billing flow from savedInstanceState");
this.f18396o = bundle.getBoolean("send_cancelled_broadcast_if_finished", false);
if (bundle.containsKey(ProxyAmazonBillingActivity.EXTRAS_RESULT_RECEIVER)) {
this.f18394m = (ResultReceiver) bundle.getParcelable(ProxyAmazonBillingActivity.EXTRAS_RESULT_RECEIVER);
} else if (bundle.containsKey("in_app_message_result_receiver")) {
this.f18395n = (ResultReceiver) bundle.getParcelable("in_app_message_result_receiver");
}
this.f18397p = bundle.getBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", false);
return;
}
AbstractC1467m.d("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.f18397p = true;
i10 = 110;
i6 = i10;
} else {
i6 = 100;
}
} else if (getIntent().hasExtra("SUBS_MANAGEMENT_INTENT")) {
pendingIntent = (PendingIntent) getIntent().getParcelableExtra("SUBS_MANAGEMENT_INTENT");
this.f18394m = (ResultReceiver) getIntent().getParcelableExtra(ProxyAmazonBillingActivity.EXTRAS_RESULT_RECEIVER);
i6 = 100;
} else if (getIntent().hasExtra("IN_APP_MESSAGE_INTENT")) {
pendingIntent = (PendingIntent) getIntent().getParcelableExtra("IN_APP_MESSAGE_INTENT");
this.f18395n = (ResultReceiver) getIntent().getParcelableExtra("in_app_message_result_receiver");
i10 = 101;
i6 = i10;
} else {
i6 = 100;
pendingIntent = null;
}
try {
this.f18396o = true;
startIntentSenderForResult(pendingIntent.getIntentSender(), i6, new Intent(), 0, 0, 0);
} catch (IntentSender.SendIntentException e3) {
AbstractC1467m.f("ProxyBillingActivity", "Got exception while trying to start a purchase flow.", e3);
ResultReceiver resultReceiver = this.f18394m;
if (resultReceiver != null) {
resultReceiver.send(6, null);
} else {
ResultReceiver resultReceiver2 = this.f18395n;
if (resultReceiver2 != null) {
resultReceiver2.send(0, null);
} else {
Intent a10 = a();
if (this.f18397p) {
a10.putExtra("IS_FIRST_PARTY_PURCHASE", true);
}
a10.putExtra("RESPONSE_CODE", 6);
a10.putExtra("DEBUG_MESSAGE", "An internal error occurred.");
sendBroadcast(a10);
}
}
this.f18396o = false;
finish();
}
}
@Override
public final void onDestroy() {
super.onDestroy();
if (isFinishing() && this.f18396o) {
Intent a10 = a();
a10.putExtra("RESPONSE_CODE", 1);
a10.putExtra("DEBUG_MESSAGE", "Billing dialog closed.");
sendBroadcast(a10);
}
}
@Override
public final void onSaveInstanceState(Bundle bundle) {
ResultReceiver resultReceiver = this.f18394m;
if (resultReceiver != null) {
bundle.putParcelable(ProxyAmazonBillingActivity.EXTRAS_RESULT_RECEIVER, resultReceiver);
}
ResultReceiver resultReceiver2 = this.f18395n;
if (resultReceiver2 != null) {
bundle.putParcelable("in_app_message_result_receiver", resultReceiver2);
}
bundle.putBoolean("send_cancelled_broadcast_if_finished", this.f18396o);
bundle.putBoolean("IS_FLOW_FROM_FIRST_PARTY_CLIENT", this.f18397p);
}
}