package com.discord.workers; import android.app.Application; import android.content.Context; import androidx.work.ListenableWorker; import androidx.work.Worker; import androidx.work.WorkerParameters; import com.discord.stores.StoreStream; import d0.z.d.m; import j0.k.b; /* compiled from: BackgroundMessageSendWorker.kt */ public final class BackgroundMessageSendWorker extends Worker { /* compiled from: BackgroundMessageSendWorker.kt */ public static final class a implements b { public static final a i = new a(); /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // j0.k.b public Boolean call(Boolean bool) { return Boolean.valueOf(m.areEqual(bool, Boolean.TRUE)); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public BackgroundMessageSendWorker(Context context, WorkerParameters workerParameters) { super(context, workerParameters); m.checkNotNullParameter(context, "context"); m.checkNotNullParameter(workerParameters, "params"); } @Override // androidx.work.Worker public ListenableWorker.Result doWork() { Context applicationContext = getApplicationContext(); if (!(applicationContext instanceof Application)) { applicationContext = null; } Application application = (Application) applicationContext; if (application != null) { StoreStream.Companion companion = StoreStream.Companion; companion.initialize(application); new j0.m.b(companion.getMessages().observeInitResendFinished().x(a.i).Z(1)).a(); ListenableWorker.Result success = ListenableWorker.Result.success(); m.checkNotNullExpressionValue(success, "Result.success()"); return success; } ListenableWorker.Result failure = ListenableWorker.Result.failure(); m.checkNotNullExpressionValue(failure, "Result.failure()"); return failure; } }