package defpackage;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.PowerManager;
import android.view.ViewGroup;
import androidx.work.impl.foreground.SystemForegroundService;
import j$.util.Objects;
import java.util.UUID;

/* JADX INFO: renamed from: ᵿᵮˌᵺ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class C5532 implements InterfaceC1841 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final /* synthetic */ int f20878;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final /* synthetic */ Object f20879;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final /* synthetic */ Object f20880;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final /* synthetic */ Object f20881;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final /* synthetic */ Object f20882;

    public /* synthetic */ C5532(Object obj, Object obj2, Object obj3, Object obj4, int i) {
        this.f20878 = i;
        this.f20880 = obj;
        this.f20879 = obj2;
        this.f20881 = obj3;
        this.f20882 = obj4;
    }

    @Override // defpackage.InterfaceC1841
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final Object mo1021() {
        switch (this.f20878) {
            case 0:
                C0420 c0420 = (C0420) this.f20880;
                ViewGroup viewGroup = (ViewGroup) this.f20879;
                Object obj = this.f20881;
                C2761 c2761 = (C2761) this.f20882;
                C5063 c5063 = C5063.f19112;
                AbstractC0651.m2324(2);
                Object objMo8953 = c0420.f2346.mo8953(viewGroup, obj);
                c0420.f2336 = objMo8953;
                if (objMo8953 == null) {
                    AbstractC0651.m2324(2);
                    c0420.f2340 = true;
                } else {
                    c2761.f10617 = new C0783(c0420, obj, viewGroup);
                    if (AbstractC0651.m2324(2)) {
                        C5362 c5362 = c0420.f2344;
                        C5362 c53622 = c0420.f2337;
                        Objects.toString(c5362);
                        Objects.toString(c53622);
                    }
                }
                return c5063;
            default:
                C1567 c1567 = (C1567) this.f20880;
                UUID uuid = (UUID) this.f20879;
                C2860 c2860 = (C2860) this.f20881;
                Context context = (Context) this.f20882;
                String string = uuid.toString();
                C2590 c2590M7404 = c1567.f6273.m7404(string);
                if (c2590M7404 == null || c2590M7404.f9998.m10217()) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Calls to setForegroundAsync() must complete before a ListenableWorker signals completion of work by returning an instance of Result.");
                    return null;
                }
                C5564 c5564 = c1567.f6272;
                synchronized (c5564.f20999) {
                    try {
                        C3814.m8515().getClass();
                        C4351 c4351 = (C4351) c5564.f20998.remove(string);
                        if (c4351 != null) {
                            if (c5564.f20997 == null) {
                                PowerManager.WakeLock wakeLockM7710 = AbstractC3357.m7710(c5564.f20992);
                                c5564.f20997 = wakeLockM7710;
                                wakeLockM7710.acquire();
                            }
                            c5564.f21002.put(string, c4351);
                            Intent intentM11078 = C5458.m11078(c5564.f20992, ᵷᵸˁ.ᵝᵶ(c4351.f16552), c2860);
                            Context context2 = c5564.f20992;
                            if (Build.VERSION.SDK_INT >= 26) {
                                AbstractC1554.m4383(context2, intentM11078);
                            } else {
                                context2.startService(intentM11078);
                            }
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                    break;
                }
                C4272 c4272 = ᵷᵸˁ.ᵝᵶ(c2590M7404);
                int i = C5458.f20666;
                Intent intent = new Intent(context, (Class<?>) SystemForegroundService.class);
                intent.setAction("ACTION_NOTIFY");
                intent.putExtra("KEY_NOTIFICATION_ID", c2860.f10960);
                intent.putExtra("KEY_FOREGROUND_SERVICE_TYPE", c2860.f10958);
                intent.putExtra("KEY_NOTIFICATION", c2860.f10959);
                intent.putExtra("KEY_WORKSPEC_ID", c4272.f16323);
                intent.putExtra("KEY_GENERATION", c4272.f16322);
                context.startService(intent);
                return null;
        }
    }
}
