package com.martsnew.tv;

import L4.b;
import L4.m;
import M4.i;
import P6.g;
import android.app.Application;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Build;
import c6.AbstractC0586b;
import com.google.android.material.datepicker.c;
import f2.C0920j;
import f2.InterfaceC0915e;
import java.util.concurrent.TimeUnit;
import l6.C1139a;
import p2.C1413c;
import p5.C1431a;
import p5.h;
import r5.C1501f;
import r5.InterfaceC1510o;
import t2.C1534a;
import v6.f;
import x6.InterfaceC1724b;

/* JADX INFO: loaded from: classes.dex */
public final class TVApp extends Application implements InterfaceC0915e, InterfaceC1724b {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public boolean f11110q = false;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final f f11111r = new f(new C1139a(this));

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public C1431a f11112s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public h f11113t;

    public final C0920j a() {
        c cVar = new c(this, 6);
        C1534a c1534a = new C1534a(100);
        C1413c c1413c = (C1413c) cVar.f10220s;
        cVar.f10220s = new C1413c(c1413c.f16031a, c1413c.f16032b, c1413c.f16033c, c1413c.f16034d, c1534a, c1413c.f16036f, c1413c.f16037g, c1413c.f16038h, c1413c.i, c1413c.f16039j, c1413c.f16040k, c1413c.f16041l, c1413c.f16042m, c1413c.f16043n, c1413c.f16044o);
        return cVar.n();
    }

    public final void b() {
        if (!this.f11110q) {
            this.f11110q = true;
            C1501f c1501f = (C1501f) ((InterfaceC1510o) this.f11111r.l());
            this.f11112s = (C1431a) c1501f.f16498e.get();
            this.f11113t = (h) c1501f.f16500f.get();
        }
        super.onCreate();
    }

    @Override // x6.InterfaceC1724b
    public final Object l() {
        return this.f11111r.l();
    }

    @Override // android.app.Application
    public final void onCreate() throws Throwable {
        L4.c cVarA;
        L4.h hVar;
        long seconds;
        b();
        try {
            cVarA = ((m) W3.f.c().b(m.class)).a();
            g.d(cVarA, "getInstance()");
            hVar = new L4.h();
            hVar.f4006a = i.i;
            seconds = TimeUnit.HOURS.toSeconds(1L);
        } catch (Exception unused) {
        }
        if (seconds < 0) {
            throw new IllegalArgumentException("Minimum interval between fetches has to be a non-negative number. " + seconds + " is an invalid argument");
        }
        hVar.f4006a = seconds;
        L4.h hVar2 = new L4.h();
        hVar2.f4006a = hVar.f4006a;
        W2.g.f(cVarA.f3998b, new b(cVarA, 0, hVar2));
        Context applicationContext = getApplicationContext();
        g.d(applicationContext, "getApplicationContext(...)");
        if (Build.VERSION.SDK_INT >= 26) {
            String string = applicationContext.getString(R.string.channel_name_player);
            g.d(string, "getString(...)");
            String string2 = applicationContext.getString(R.string.channel_description_player);
            g.d(string2, "getString(...)");
            AbstractC0586b.m();
            NotificationChannel notificationChannelC = AbstractC0586b.c(string);
            notificationChannelC.setDescription(string2);
            Object systemService = applicationContext.getSystemService("notification");
            g.c(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
            ((NotificationManager) systemService).createNotificationChannel(notificationChannelC);
        }
    }
}
