package com.google.firebase.messaging; import android.content.Context; import com.google.android.gms.common.util.concurrent.NamedThreadFactory; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; import com.google.firebase.FirebaseApp; import com.google.firebase.heartbeatinfo.HeartBeatInfo; import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.iid.zzao; import com.google.firebase.installations.FirebaseInstallationsApi; import com.google.firebase.platforminfo.UserAgentPublisher; import java.util.concurrent.ScheduledThreadPoolExecutor; import o.FsM; /* loaded from: classes2.dex */ public class FirebaseMessaging { static FsM zza; private final Context zzb; private final FirebaseInstanceId zzc; private final Task zzd; /* JADX INFO: Access modifiers changed from: package-private */ public FirebaseMessaging(FirebaseApp firebaseApp, FirebaseInstanceId firebaseInstanceId, UserAgentPublisher userAgentPublisher, HeartBeatInfo heartBeatInfo, FirebaseInstallationsApi firebaseInstallationsApi, FsM fsM) { zza = fsM; this.zzc = firebaseInstanceId; Context applicationContext = firebaseApp.getApplicationContext(); this.zzb = applicationContext; Task zza2 = zzab.zza(firebaseApp, firebaseInstanceId, new zzao(applicationContext), userAgentPublisher, heartBeatInfo, firebaseInstallationsApi, applicationContext, zzi.zza(), new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("Firebase-Messaging-Topics-Io"))); this.zzd = zza2; zza2.addOnSuccessListener(zzi.zzb(), new OnSuccessListener(this) { // from class: com.google.firebase.messaging.zzk private final FirebaseMessaging zza; @Override // com.google.android.gms.tasks.OnSuccessListener public final void onSuccess(Object obj) { zzab zzabVar = (zzab) obj; if (this.zza.isAutoInitEnabled()) { zzabVar.zza(); } } /* JADX INFO: Access modifiers changed from: package-private */ { this.zza = this; } }); } public boolean isAutoInitEnabled() { return this.zzc.zzh(); } }