正在查看: Mint v5.7.3 应用的 ProxyBillingActivityV2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 ProxyBillingActivityV2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.android.billingclient.api;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.os.ResultReceiver;
import android.view.ComponentActivity;
import android.view.result.ActivityResult;
import android.view.result.ActivityResultCallback;
import android.view.result.ActivityResultLauncher;
import android.view.result.IntentSenderRequest;
import android.view.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.google.android.apps.common.proguard.UsedByReflection;
import com.google.android.gms.internal.play_billing.zzb;
@UsedByReflection("PlatformActivityProxy")
public class ProxyBillingActivityV2 extends ComponentActivity {
private ActivityResultLauncher f793a;
private ActivityResultLauncher f794b;
@Nullable
private ResultReceiver f795c;
@Nullable
private ResultReceiver f796d;
@VisibleForTesting
final void E(ActivityResult activityResult) {
Intent data = activityResult.getData();
int b2 = zzb.zze(data, "ProxyBillingActivityV2").b();
ResultReceiver resultReceiver = this.f795c;
if (resultReceiver != null) {
resultReceiver.send(b2, data == null ? null : data.getExtras());
}
if (activityResult.getResultCode() != -1 || b2 != 0) {
zzb.zzk("ProxyBillingActivityV2", "Alternative billing only dialog finished with resultCode " + activityResult.getResultCode() + " and billing's responseCode: " + b2);
}
finish();
}
@VisibleForTesting
final void F(ActivityResult activityResult) {
Intent data = activityResult.getData();
int b2 = zzb.zze(data, "ProxyBillingActivityV2").b();
ResultReceiver resultReceiver = this.f796d;
if (resultReceiver != null) {
resultReceiver.send(b2, data == null ? null : data.getExtras());
}
if (activityResult.getResultCode() != -1 || b2 != 0) {
zzb.zzk("ProxyBillingActivityV2", String.format("External offer dialog finished with resultCode: %s and billing's responseCode: %s", Integer.valueOf(activityResult.getResultCode()), Integer.valueOf(b2)));
}
finish();
}
@Override
protected final void onCreate(@Nullable Bundle bundle) {
super.onCreate(bundle);
this.f793a = registerForActivityResult(new ActivityResultContracts.StartIntentSenderForResult(), new ActivityResultCallback() {
@Override
public final void onActivityResult(Object obj) {
ProxyBillingActivityV2.this.E((ActivityResult) obj);
}
});
this.f794b = registerForActivityResult(new ActivityResultContracts.StartIntentSenderForResult(), new ActivityResultCallback() {
@Override
public final void onActivityResult(Object obj) {
ProxyBillingActivityV2.this.F((ActivityResult) obj);
}
});
if (bundle != null) {
if (bundle.containsKey("alternative_billing_only_dialog_result_receiver")) {
this.f795c = (ResultReceiver) bundle.getParcelable("alternative_billing_only_dialog_result_receiver");
return;
} else {
if (bundle.containsKey("external_payment_dialog_result_receiver")) {
this.f796d = (ResultReceiver) bundle.getParcelable("external_payment_dialog_result_receiver");
return;
}
return;
}
}
zzb.zzj("ProxyBillingActivityV2", "Launching Play Store billing dialog");
if (getIntent().hasExtra("ALTERNATIVE_BILLING_ONLY_DIALOG_INTENT")) {
PendingIntent pendingIntent = (PendingIntent) getIntent().getParcelableExtra("ALTERNATIVE_BILLING_ONLY_DIALOG_INTENT");
this.f795c = (ResultReceiver) getIntent().getParcelableExtra("alternative_billing_only_dialog_result_receiver");
this.f793a.launch(new IntentSenderRequest.Builder(pendingIntent).build());
} else if (getIntent().hasExtra("external_payment_dialog_pending_intent")) {
PendingIntent pendingIntent2 = (PendingIntent) getIntent().getParcelableExtra("external_payment_dialog_pending_intent");
this.f796d = (ResultReceiver) getIntent().getParcelableExtra("external_payment_dialog_result_receiver");
this.f794b.launch(new IntentSenderRequest.Builder(pendingIntent2).build());
}
}
@Override
protected final void onSaveInstanceState(@NonNull Bundle bundle) {
super.onSaveInstanceState(bundle);
ResultReceiver resultReceiver = this.f795c;
if (resultReceiver != null) {
bundle.putParcelable("alternative_billing_only_dialog_result_receiver", resultReceiver);
}
ResultReceiver resultReceiver2 = this.f796d;
if (resultReceiver2 != null) {
bundle.putParcelable("external_payment_dialog_result_receiver", resultReceiver2);
}
}
}