what-the-bank/sources/com/google/firebase/iid/FirebaseInstanceIdReceiver....

61 lines
2.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.iid;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Parcelable;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import java.util.concurrent.ExecutorService;
import o.xsS;
/* loaded from: classes2.dex */
public final class FirebaseInstanceIdReceiver extends xsS {
private final ExecutorService zza = zzh.zzb();
@Override // android.content.BroadcastReceiver
public final void onReceive(Context context, Intent intent) {
zzb zzaVar;
if (intent == null) {
return;
}
Parcelable parcelableExtra = intent.getParcelableExtra("wrapped_intent");
Intent intent2 = parcelableExtra instanceof Intent ? (Intent) parcelableExtra : null;
if (intent2 != null) {
intent = intent2;
}
intent.setComponent(null);
intent.setPackage(context.getPackageName());
if ("google.com/iid".equals(intent.getStringExtra("from"))) {
zzaVar = new zzz(this.zza);
} else {
zzaVar = new zza(context, this.zza);
}
final boolean isOrderedBroadcast = isOrderedBroadcast();
final BroadcastReceiver.PendingResult goAsync = goAsync();
zzaVar.zza(intent).addOnCompleteListener(this.zza, new OnCompleteListener(isOrderedBroadcast, goAsync) { // from class: com.google.firebase.iid.zzr
private final boolean zza;
private final BroadcastReceiver.PendingResult zzb;
@Override // com.google.android.gms.tasks.OnCompleteListener
public final void onComplete(Task task) {
FirebaseInstanceIdReceiver.zza(this.zza, this.zzb, task);
}
/* JADX INFO: Access modifiers changed from: package-private */
{
this.zza = isOrderedBroadcast;
this.zzb = goAsync;
}
});
}
/* JADX INFO: Access modifiers changed from: package-private */
public static final /* synthetic */ void zza(boolean z, BroadcastReceiver.PendingResult pendingResult, Task task) {
if (z) {
pendingResult.setResultCode(task.isSuccessful() ? ((Integer) task.getResult()).intValue() : 500);
}
pendingResult.finish();
}
}