package androidx.work.impl.background.systemalarm;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import java.util.Objects;
import o.C0669Zu;
import o.C2651um0;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public class RescheduleReceiver extends BroadcastReceiver {
    static {
        C0669Zu.l("RescheduleReceiver");
    }

    @Override // android.content.BroadcastReceiver
    public final void onReceive(Context context, Intent intent) {
        C0669Zu c0669ZuE = C0669Zu.e();
        Objects.toString(intent);
        c0669ZuE.getClass();
        try {
            C2651um0 c2651um0H = C2651um0.H(context);
            BroadcastReceiver.PendingResult pendingResultGoAsync = goAsync();
            synchronized (C2651um0.w) {
                try {
                    BroadcastReceiver.PendingResult pendingResult = c2651um0H.s;
                    if (pendingResult != null) {
                        pendingResult.finish();
                    }
                    c2651um0H.s = pendingResultGoAsync;
                    if (c2651um0H.r) {
                        pendingResultGoAsync.finish();
                        c2651um0H.s = null;
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
        } catch (IllegalStateException unused) {
            C0669Zu.e().getClass();
        }
    }
}
