package o;

import android.app.ActivityManager;
import android.app.Service;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
import android.text.TextUtils;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.util.Clock;
import com.google.android.gms.measurement.AppMeasurementReceiver;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.kj0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1696kj0 implements InterfaceC1315gj0, ST, InterfaceC2384rv0, Ut0 {
    public final /* synthetic */ int l;
    public final Object m;

    public /* synthetic */ C1696kj0(int i, Object obj) {
        this.l = i;
        this.m = obj;
    }

    public static void h(FC fc) {
        fc.g("CREATE TABLE IF NOT EXISTS `Dependency` (`work_spec_id` TEXT NOT NULL, `prerequisite_id` TEXT NOT NULL, PRIMARY KEY(`work_spec_id`, `prerequisite_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`prerequisite_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        fc.g("CREATE INDEX IF NOT EXISTS `index_Dependency_work_spec_id` ON `Dependency` (`work_spec_id`)");
        fc.g("CREATE INDEX IF NOT EXISTS `index_Dependency_prerequisite_id` ON `Dependency` (`prerequisite_id`)");
        fc.g("CREATE TABLE IF NOT EXISTS `WorkSpec` (`id` TEXT NOT NULL, `state` INTEGER NOT NULL, `worker_class_name` TEXT NOT NULL, `input_merger_class_name` TEXT NOT NULL, `input` BLOB NOT NULL, `output` BLOB NOT NULL, `initial_delay` INTEGER NOT NULL, `interval_duration` INTEGER NOT NULL, `flex_duration` INTEGER NOT NULL, `run_attempt_count` INTEGER NOT NULL, `backoff_policy` INTEGER NOT NULL, `backoff_delay_duration` INTEGER NOT NULL, `last_enqueue_time` INTEGER NOT NULL DEFAULT -1, `minimum_retention_duration` INTEGER NOT NULL, `schedule_requested_at` INTEGER NOT NULL, `run_in_foreground` INTEGER NOT NULL, `out_of_quota_policy` INTEGER NOT NULL, `period_count` INTEGER NOT NULL DEFAULT 0, `generation` INTEGER NOT NULL DEFAULT 0, `next_schedule_time_override` INTEGER NOT NULL DEFAULT 9223372036854775807, `next_schedule_time_override_generation` INTEGER NOT NULL DEFAULT 0, `stop_reason` INTEGER NOT NULL DEFAULT -256, `required_network_type` INTEGER NOT NULL, `requires_charging` INTEGER NOT NULL, `requires_device_idle` INTEGER NOT NULL, `requires_battery_not_low` INTEGER NOT NULL, `requires_storage_not_low` INTEGER NOT NULL, `trigger_content_update_delay` INTEGER NOT NULL, `trigger_max_content_delay` INTEGER NOT NULL, `content_uri_triggers` BLOB NOT NULL, PRIMARY KEY(`id`))");
        fc.g("CREATE INDEX IF NOT EXISTS `index_WorkSpec_schedule_requested_at` ON `WorkSpec` (`schedule_requested_at`)");
        fc.g("CREATE INDEX IF NOT EXISTS `index_WorkSpec_last_enqueue_time` ON `WorkSpec` (`last_enqueue_time`)");
        fc.g("CREATE TABLE IF NOT EXISTS `WorkTag` (`tag` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`tag`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        fc.g("CREATE INDEX IF NOT EXISTS `index_WorkTag_work_spec_id` ON `WorkTag` (`work_spec_id`)");
        fc.g("CREATE TABLE IF NOT EXISTS `SystemIdInfo` (`work_spec_id` TEXT NOT NULL, `generation` INTEGER NOT NULL DEFAULT 0, `system_id` INTEGER NOT NULL, PRIMARY KEY(`work_spec_id`, `generation`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        fc.g("CREATE TABLE IF NOT EXISTS `WorkName` (`name` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`name`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        fc.g("CREATE INDEX IF NOT EXISTS `index_WorkName_work_spec_id` ON `WorkName` (`work_spec_id`)");
        fc.g("CREATE TABLE IF NOT EXISTS `WorkProgress` (`work_spec_id` TEXT NOT NULL, `progress` BLOB NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )");
        fc.g("CREATE TABLE IF NOT EXISTS `Preference` (`key` TEXT NOT NULL, `long_value` INTEGER, PRIMARY KEY(`key`))");
        fc.g("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)");
        fc.g("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7d73d21f1bd82c9e5268b6dcf9fde2cb')");
    }

    public static W1 i(FC fc) {
        HashMap map = new HashMap(2);
        map.put("work_spec_id", new C2726vc0("work_spec_id", "TEXT", true, 1, null, 1));
        map.put("prerequisite_id", new C2726vc0("prerequisite_id", "TEXT", true, 2, null, 1));
        HashSet hashSet = new HashSet(2);
        hashSet.add(new C2821wc0("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList("id")));
        hashSet.add(new C2821wc0("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("prerequisite_id"), Arrays.asList("id")));
        HashSet hashSet2 = new HashSet(2);
        hashSet2.add(new C3011yc0("index_Dependency_work_spec_id", false, Arrays.asList("work_spec_id"), Arrays.asList("ASC")));
        hashSet2.add(new C3011yc0("index_Dependency_prerequisite_id", false, Arrays.asList("prerequisite_id"), Arrays.asList("ASC")));
        C3106zc0 c3106zc0 = new C3106zc0("Dependency", map, hashSet, hashSet2);
        C3106zc0 c3106zc0A = C3106zc0.a(fc, "Dependency");
        if (!c3106zc0.equals(c3106zc0A)) {
            return new W1(false, "Dependency(androidx.work.impl.model.Dependency).\n Expected:\n" + c3106zc0 + "\n Found:\n" + c3106zc0A);
        }
        HashMap map2 = new HashMap(30);
        map2.put("id", new C2726vc0("id", "TEXT", true, 1, null, 1));
        map2.put("state", new C2726vc0("state", "INTEGER", true, 0, null, 1));
        map2.put("worker_class_name", new C2726vc0("worker_class_name", "TEXT", true, 0, null, 1));
        map2.put("input_merger_class_name", new C2726vc0("input_merger_class_name", "TEXT", true, 0, null, 1));
        map2.put("input", new C2726vc0("input", "BLOB", true, 0, null, 1));
        map2.put("output", new C2726vc0("output", "BLOB", true, 0, null, 1));
        map2.put("initial_delay", new C2726vc0("initial_delay", "INTEGER", true, 0, null, 1));
        map2.put("interval_duration", new C2726vc0("interval_duration", "INTEGER", true, 0, null, 1));
        map2.put("flex_duration", new C2726vc0("flex_duration", "INTEGER", true, 0, null, 1));
        map2.put("run_attempt_count", new C2726vc0("run_attempt_count", "INTEGER", true, 0, null, 1));
        map2.put("backoff_policy", new C2726vc0("backoff_policy", "INTEGER", true, 0, null, 1));
        map2.put("backoff_delay_duration", new C2726vc0("backoff_delay_duration", "INTEGER", true, 0, null, 1));
        map2.put("last_enqueue_time", new C2726vc0("last_enqueue_time", "INTEGER", true, 0, "-1", 1));
        map2.put("minimum_retention_duration", new C2726vc0("minimum_retention_duration", "INTEGER", true, 0, null, 1));
        map2.put("schedule_requested_at", new C2726vc0("schedule_requested_at", "INTEGER", true, 0, null, 1));
        map2.put("run_in_foreground", new C2726vc0("run_in_foreground", "INTEGER", true, 0, null, 1));
        map2.put("out_of_quota_policy", new C2726vc0("out_of_quota_policy", "INTEGER", true, 0, null, 1));
        map2.put("period_count", new C2726vc0("period_count", "INTEGER", true, 0, "0", 1));
        map2.put("generation", new C2726vc0("generation", "INTEGER", true, 0, "0", 1));
        map2.put("next_schedule_time_override", new C2726vc0("next_schedule_time_override", "INTEGER", true, 0, "9223372036854775807", 1));
        map2.put("next_schedule_time_override_generation", new C2726vc0("next_schedule_time_override_generation", "INTEGER", true, 0, "0", 1));
        map2.put("stop_reason", new C2726vc0("stop_reason", "INTEGER", true, 0, "-256", 1));
        map2.put("required_network_type", new C2726vc0("required_network_type", "INTEGER", true, 0, null, 1));
        map2.put("requires_charging", new C2726vc0("requires_charging", "INTEGER", true, 0, null, 1));
        map2.put("requires_device_idle", new C2726vc0("requires_device_idle", "INTEGER", true, 0, null, 1));
        map2.put("requires_battery_not_low", new C2726vc0("requires_battery_not_low", "INTEGER", true, 0, null, 1));
        map2.put("requires_storage_not_low", new C2726vc0("requires_storage_not_low", "INTEGER", true, 0, null, 1));
        map2.put("trigger_content_update_delay", new C2726vc0("trigger_content_update_delay", "INTEGER", true, 0, null, 1));
        map2.put("trigger_max_content_delay", new C2726vc0("trigger_max_content_delay", "INTEGER", true, 0, null, 1));
        map2.put("content_uri_triggers", new C2726vc0("content_uri_triggers", "BLOB", true, 0, null, 1));
        HashSet hashSet3 = new HashSet(0);
        HashSet hashSet4 = new HashSet(2);
        hashSet4.add(new C3011yc0("index_WorkSpec_schedule_requested_at", false, Arrays.asList("schedule_requested_at"), Arrays.asList("ASC")));
        hashSet4.add(new C3011yc0("index_WorkSpec_last_enqueue_time", false, Arrays.asList("last_enqueue_time"), Arrays.asList("ASC")));
        C3106zc0 c3106zc02 = new C3106zc0("WorkSpec", map2, hashSet3, hashSet4);
        C3106zc0 c3106zc0A2 = C3106zc0.a(fc, "WorkSpec");
        if (!c3106zc02.equals(c3106zc0A2)) {
            return new W1(false, "WorkSpec(androidx.work.impl.model.WorkSpec).\n Expected:\n" + c3106zc02 + "\n Found:\n" + c3106zc0A2);
        }
        HashMap map3 = new HashMap(2);
        map3.put("tag", new C2726vc0("tag", "TEXT", true, 1, null, 1));
        map3.put("work_spec_id", new C2726vc0("work_spec_id", "TEXT", true, 2, null, 1));
        HashSet hashSet5 = new HashSet(1);
        hashSet5.add(new C2821wc0("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList("id")));
        HashSet hashSet6 = new HashSet(1);
        hashSet6.add(new C3011yc0("index_WorkTag_work_spec_id", false, Arrays.asList("work_spec_id"), Arrays.asList("ASC")));
        C3106zc0 c3106zc03 = new C3106zc0("WorkTag", map3, hashSet5, hashSet6);
        C3106zc0 c3106zc0A3 = C3106zc0.a(fc, "WorkTag");
        if (!c3106zc03.equals(c3106zc0A3)) {
            return new W1(false, "WorkTag(androidx.work.impl.model.WorkTag).\n Expected:\n" + c3106zc03 + "\n Found:\n" + c3106zc0A3);
        }
        HashMap map4 = new HashMap(3);
        map4.put("work_spec_id", new C2726vc0("work_spec_id", "TEXT", true, 1, null, 1));
        map4.put("generation", new C2726vc0("generation", "INTEGER", true, 2, "0", 1));
        map4.put("system_id", new C2726vc0("system_id", "INTEGER", true, 0, null, 1));
        HashSet hashSet7 = new HashSet(1);
        hashSet7.add(new C2821wc0("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList("id")));
        C3106zc0 c3106zc04 = new C3106zc0("SystemIdInfo", map4, hashSet7, new HashSet(0));
        C3106zc0 c3106zc0A4 = C3106zc0.a(fc, "SystemIdInfo");
        if (!c3106zc04.equals(c3106zc0A4)) {
            return new W1(false, "SystemIdInfo(androidx.work.impl.model.SystemIdInfo).\n Expected:\n" + c3106zc04 + "\n Found:\n" + c3106zc0A4);
        }
        HashMap map5 = new HashMap(2);
        map5.put("name", new C2726vc0("name", "TEXT", true, 1, null, 1));
        map5.put("work_spec_id", new C2726vc0("work_spec_id", "TEXT", true, 2, null, 1));
        HashSet hashSet8 = new HashSet(1);
        hashSet8.add(new C2821wc0("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList("id")));
        HashSet hashSet9 = new HashSet(1);
        hashSet9.add(new C3011yc0("index_WorkName_work_spec_id", false, Arrays.asList("work_spec_id"), Arrays.asList("ASC")));
        C3106zc0 c3106zc05 = new C3106zc0("WorkName", map5, hashSet8, hashSet9);
        C3106zc0 c3106zc0A5 = C3106zc0.a(fc, "WorkName");
        if (!c3106zc05.equals(c3106zc0A5)) {
            return new W1(false, "WorkName(androidx.work.impl.model.WorkName).\n Expected:\n" + c3106zc05 + "\n Found:\n" + c3106zc0A5);
        }
        HashMap map6 = new HashMap(2);
        map6.put("work_spec_id", new C2726vc0("work_spec_id", "TEXT", true, 1, null, 1));
        map6.put("progress", new C2726vc0("progress", "BLOB", true, 0, null, 1));
        HashSet hashSet10 = new HashSet(1);
        hashSet10.add(new C2821wc0("WorkSpec", "CASCADE", "CASCADE", Arrays.asList("work_spec_id"), Arrays.asList("id")));
        C3106zc0 c3106zc06 = new C3106zc0("WorkProgress", map6, hashSet10, new HashSet(0));
        C3106zc0 c3106zc0A6 = C3106zc0.a(fc, "WorkProgress");
        if (!c3106zc06.equals(c3106zc0A6)) {
            return new W1(false, "WorkProgress(androidx.work.impl.model.WorkProgress).\n Expected:\n" + c3106zc06 + "\n Found:\n" + c3106zc0A6);
        }
        HashMap map7 = new HashMap(2);
        map7.put("key", new C2726vc0("key", "TEXT", true, 1, null, 1));
        map7.put("long_value", new C2726vc0("long_value", "INTEGER", false, 0, null, 1));
        C3106zc0 c3106zc07 = new C3106zc0("Preference", map7, new HashSet(0), new HashSet(0));
        C3106zc0 c3106zc0A7 = C3106zc0.a(fc, "Preference");
        if (c3106zc07.equals(c3106zc0A7)) {
            return new W1(true, (String) null);
        }
        return new W1(false, "Preference(androidx.work.impl.model.Preference).\n Expected:\n" + c3106zc07 + "\n Found:\n" + c3106zc0A7);
    }

    public static C1696kj0 t(String str) {
        return new C1696kj0(8, (TextUtils.isEmpty(str) || str.length() > 1) ? EnumC1809ls0.m : C2284qs0.e(str.charAt(0)));
    }

    @Override // o.InterfaceC1315gj0, o.InterfaceC1028dj0
    public boolean a() {
        ((S60) this.m).getClass();
        return false;
    }

    @Override // o.InterfaceC1028dj0
    public long b(Y6 y6, Y6 y62, Y6 y63) {
        return ((S60) this.m).b(y6, y62, y63);
    }

    @Override // o.InterfaceC2384rv0
    public void c(String str, String str2, Bundle bundle) {
        Xs0 xs0 = (Xs0) this.m;
        if (TextUtils.isEmpty(str)) {
            xs0.x("auto", "_err", bundle, true, true, ((Kr0) xs0.a).k.currentTimeMillis());
        } else {
            xs0.getClass();
            throw new IllegalStateException("Unexpected call on client side");
        }
    }

    @Override // o.Ut0
    public boolean d(Class cls) {
        for (int i = 0; i < 2; i++) {
            if (((Ut0[]) this.m)[i].d(cls)) {
                return true;
            }
        }
        return false;
    }

    @Override // o.ST
    public void e(Object obj) {
        ((Qc0) ((C1696kj0) this.m).m).a.n();
    }

    @Override // o.Ut0
    public C1527iu0 f(Class cls) {
        for (int i = 0; i < 2; i++) {
            Ut0 ut0 = ((Ut0[]) this.m)[i];
            if (ut0.d(cls)) {
                return ut0.f(cls);
            }
        }
        throw new UnsupportedOperationException("No factory is available for message type: ".concat(cls.getName()));
    }

    public boolean g(Dm0 dm0) {
        List list = (List) this.m;
        ArrayList arrayList = new ArrayList();
        for (Object obj : list) {
            AbstractC0063Cl abstractC0063Cl = (AbstractC0063Cl) obj;
            if (abstractC0063Cl.b(dm0) && abstractC0063Cl.c(abstractC0063Cl.a.a())) {
                arrayList.add(obj);
            }
        }
        if (!arrayList.isEmpty()) {
            C0669Zu c0669ZuE = C0669Zu.e();
            int i = AbstractC1702km0.a;
            AbstractC3117zi.i0(arrayList, null, null, null, C2291qw.Q, 31);
            c0669ZuE.getClass();
        }
        return arrayList.isEmpty();
    }

    public Object k() {
        com.google.android.gms.internal.measurement.a aVar = (com.google.android.gms.internal.measurement.a) this.m;
        ContentResolver contentResolver = aVar.a;
        Uri uri = aVar.b;
        ContentProviderClient contentProviderClientAcquireUnstableContentProviderClient = contentResolver.acquireUnstableContentProviderClient(uri);
        try {
            if (contentProviderClientAcquireUnstableContentProviderClient == null) {
                return Collections.EMPTY_MAP;
            }
            Cursor cursorQuery = contentProviderClientAcquireUnstableContentProviderClient.query(uri, com.google.android.gms.internal.measurement.a.j, null, null, null);
            try {
                if (cursorQuery == null) {
                    return Collections.EMPTY_MAP;
                }
                int count = cursorQuery.getCount();
                if (count == 0) {
                    Map map = Collections.EMPTY_MAP;
                    cursorQuery.close();
                    return map;
                }
                Map c1839m9 = count <= 256 ? new C1839m9(count) : new HashMap(count, 1.0f);
                while (cursorQuery.moveToNext()) {
                    c1839m9.put(cursorQuery.getString(0), cursorQuery.getString(1));
                }
                if (cursorQuery.isAfterLast()) {
                    cursorQuery.close();
                    return c1839m9;
                }
                Map map2 = Collections.EMPTY_MAP;
                cursorQuery.close();
                return map2;
            } finally {
            }
        } catch (RemoteException unused) {
            return Collections.EMPTY_MAP;
        } finally {
            contentProviderClientAcquireUnstableContentProviderClient.release();
        }
    }

    @Override // o.InterfaceC1028dj0
    public Y6 l(long j, Y6 y6, Y6 y62, Y6 y63) {
        return ((S60) this.m).l(j, y6, y62, y63);
    }

    @Override // o.InterfaceC1028dj0
    public Y6 m(long j, Y6 y6, Y6 y62, Y6 y63) {
        return ((S60) this.m).m(j, y6, y62, y63);
    }

    public void n() {
        C2382ru0 c2382ru0 = (C2382ru0) this.m;
        c2382ru0.r();
        Kr0 kr0 = (Kr0) c2382ru0.a;
        C1617jr0 c1617jr0 = kr0.e;
        Kr0.j(c1617jr0);
        Clock clock = kr0.k;
        if (c1617jr0.C(clock.currentTimeMillis())) {
            C1617jr0 c1617jr02 = kr0.e;
            Kr0.j(c1617jr02);
            c1617jr02.l.b(true);
            ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
            ActivityManager.getMyMemoryState(runningAppProcessInfo);
            if (runningAppProcessInfo.importance == 100) {
                Nq0 nq0 = kr0.f;
                Kr0.l(nq0);
                nq0.n.b("Detected application was in foreground");
                u(clock.currentTimeMillis());
            }
        }
    }

    public void p(int i, String str, List list, boolean z, boolean z2) {
        C1984nl c1984nl;
        C2851wr0 c2851wr0 = (C2851wr0) this.m;
        int i2 = i - 1;
        if (i2 == 0) {
            Nq0 nq0 = ((Kr0) c2851wr0.a).f;
            Kr0.l(nq0);
            c1984nl = nq0.m;
        } else if (i2 != 1) {
            if (i2 == 3) {
                Nq0 nq02 = ((Kr0) c2851wr0.a).f;
                Kr0.l(nq02);
                c1984nl = nq02.n;
            } else if (i2 != 4) {
                Nq0 nq03 = ((Kr0) c2851wr0.a).f;
                Kr0.l(nq03);
                c1984nl = nq03.l;
            } else if (z) {
                Nq0 nq04 = ((Kr0) c2851wr0.a).f;
                Kr0.l(nq04);
                c1984nl = nq04.j;
            } else if (z2) {
                Nq0 nq05 = ((Kr0) c2851wr0.a).f;
                Kr0.l(nq05);
                c1984nl = nq05.i;
            } else {
                Nq0 nq06 = ((Kr0) c2851wr0.a).f;
                Kr0.l(nq06);
                c1984nl = nq06.k;
            }
        } else if (z) {
            Nq0 nq07 = ((Kr0) c2851wr0.a).f;
            Kr0.l(nq07);
            c1984nl = nq07.g;
        } else if (z2) {
            Nq0 nq08 = ((Kr0) c2851wr0.a).f;
            Kr0.l(nq08);
            c1984nl = nq08.f;
        } else {
            Nq0 nq09 = ((Kr0) c2851wr0.a).f;
            Kr0.l(nq09);
            c1984nl = nq09.h;
        }
        int size = list.size();
        if (size == 1) {
            c1984nl.c(list.get(0), str);
            return;
        }
        if (size == 2) {
            c1984nl.d(str, list.get(0), list.get(1));
        } else if (size != 3) {
            c1984nl.b(str);
        } else {
            c1984nl.e(str, list.get(0), list.get(1), list.get(2));
        }
    }

    public void q(long j) {
        C2382ru0 c2382ru0 = (C2382ru0) this.m;
        c2382ru0.r();
        c2382ru0.w();
        Kr0 kr0 = (Kr0) c2382ru0.a;
        C1617jr0 c1617jr0 = kr0.e;
        Kr0.j(c1617jr0);
        if (c1617jr0.C(j)) {
            Kr0.j(c1617jr0);
            c1617jr0.l.b(true);
            kr0.q().x();
        }
        Kr0.j(c1617jr0);
        c1617jr0.p.b(j);
        if (c1617jr0.l.a()) {
            u(j);
        }
    }

    @Override // o.InterfaceC1028dj0
    public Y6 r(Y6 y6, Y6 y62, Y6 y63) {
        return ((S60) this.m).r(y6, y62, y63);
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x001b  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void s(o.EnumC2094os0 r2, int r3) {
        /*
            r1 = this;
            r0 = -30
            if (r3 == r0) goto L1e
            r0 = -20
            if (r3 == r0) goto L1b
            r0 = -10
            if (r3 == r0) goto L18
            if (r3 == 0) goto L1b
            r0 = 30
            if (r3 == r0) goto L15
            o.jo0 r3 = o.EnumC1611jo0.UNSET
            goto L20
        L15:
            o.jo0 r3 = o.EnumC1611jo0.INITIALIZATION
            goto L20
        L18:
            o.jo0 r3 = o.EnumC1611jo0.MANIFEST
            goto L20
        L1b:
            o.jo0 r3 = o.EnumC1611jo0.API
            goto L20
        L1e:
            o.jo0 r3 = o.EnumC1611jo0.TCF
        L20:
            java.lang.Object r0 = r1.m
            java.util.EnumMap r0 = (java.util.EnumMap) r0
            r0.put(r2, r3)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1696kj0.s(o.os0, int):void");
    }

    public String toString() {
        switch (this.l) {
            case 6:
                StringBuilder sb = new StringBuilder("1");
                for (EnumC2094os0 enumC2094os0 : EnumC2094os0.values()) {
                    EnumC1611jo0 enumC1611jo0 = (EnumC1611jo0) ((EnumMap) this.m).get(enumC2094os0);
                    if (enumC1611jo0 == null) {
                        enumC1611jo0 = EnumC1611jo0.UNSET;
                    }
                    sb.append(enumC1611jo0.l);
                }
                return sb.toString();
            default:
                return super.toString();
        }
    }

    public void u(long j) {
        C2382ru0 c2382ru0 = (C2382ru0) this.m;
        c2382ru0.r();
        Kr0 kr0 = (Kr0) c2382ru0.a;
        if (kr0.a()) {
            C1617jr0 c1617jr0 = kr0.e;
            Kr0.j(c1617jr0);
            c1617jr0.p.b(j);
            long jElapsedRealtime = kr0.k.elapsedRealtime();
            Nq0 nq0 = kr0.f;
            Kr0.l(nq0);
            nq0.n.c(Long.valueOf(jElapsedRealtime), "Session started, time");
            long j2 = j / 1000;
            Long lValueOf = Long.valueOf(j2);
            Xs0 xs0 = kr0.m;
            Kr0.k(xs0);
            xs0.D(j, lValueOf, "auto", "_sid");
            Kr0.j(c1617jr0);
            c1617jr0.q.b(j2);
            c1617jr0.l.b(false);
            Bundle bundle = new Bundle();
            bundle.putLong("_sid", j2);
            Kr0.k(xs0);
            xs0.A(j, bundle, "auto", "_s");
            String strG = c1617jr0.v.g();
            if (TextUtils.isEmpty(strG)) {
                return;
            }
            Bundle bundle2 = new Bundle();
            bundle2.putString("_ffr", strG);
            Kr0.k(xs0);
            xs0.A(j, bundle2, "auto", "_ssr");
        }
    }

    public void v(EnumC2094os0 enumC2094os0, EnumC1611jo0 enumC1611jo0) {
        ((EnumMap) this.m).put((EnumMap) enumC2094os0, (EnumC2094os0) enumC1611jo0);
    }

    public void w(int i, Object obj, InterfaceC1718ku0 interfaceC1718ku0) throws C1723ky {
        Ns0 ns0 = (Ns0) obj;
        Zs0 zs0 = (Zs0) this.m;
        zs0.i0((i << 3) | 2);
        zs0.i0(ns0.b(interfaceC1718ku0));
        interfaceC1718ku0.c(ns0, zs0.l);
    }

    public void x(int i, Object obj, InterfaceC1718ku0 interfaceC1718ku0) throws C1723ky {
        Zs0 zs0 = (Zs0) this.m;
        zs0.Z(i, 3);
        interfaceC1718ku0.c((Ns0) obj, zs0.l);
        zs0.Z(i, 4);
    }

    public C1696kj0(int i) {
        this.l = i;
        switch (i) {
            case 7:
                this.m = new Hw0();
                break;
            default:
                this.m = new EnumMap(EnumC2094os0.class);
                break;
        }
    }

    public C1696kj0(Service service) {
        this.l = 16;
        Preconditions.checkNotNull(service);
        this.m = service;
    }

    public C1696kj0(AppMeasurementReceiver appMeasurementReceiver) {
        this.l = 10;
        Preconditions.checkNotNull(appMeasurementReceiver);
        this.m = appMeasurementReceiver;
    }

    public C1696kj0(OD od, Gm0 gm0) {
        this.l = 9;
        this.m = gm0;
        od.D(new C3037yp0(1, this));
    }

    public C1696kj0(Zs0 zs0) {
        this.l = 14;
        Charset charset = Et0.a;
        this.m = zs0;
        zs0.l = this;
    }

    public C1696kj0(EnumMap enumMap) {
        this.l = 6;
        EnumMap enumMap2 = new EnumMap(EnumC2094os0.class);
        this.m = enumMap2;
        enumMap2.putAll(enumMap);
    }

    public C1696kj0(C2062oc0 c2062oc0) {
        this.l = 3;
        C2917xd c2917xd = new C2917xd((C3012yd) c2062oc0.a, 0);
        C2917xd c2917xd2 = new C2917xd((C3012yd) c2062oc0.b, 1);
        C2917xd c2917xd3 = new C2917xd((C3012yd) c2062oc0.d, 4);
        C1096eS c1096eS = (C1096eS) c2062oc0.c;
        this.m = AbstractC0008Ai.S(c2917xd, c2917xd2, c2917xd3, new C2917xd(c1096eS, 2), new C2917xd(c1096eS, 3), new C0714aS(c1096eS), new ZR(c1096eS));
    }

    public C1696kj0(float f, float f2, Y6 y6) {
        WT wt;
        this.l = 0;
        int[] iArr = AbstractC1123ej0.a;
        if (y6 != null) {
            wt = new WT(f, f2, y6);
        } else {
            wt = new WT(f, f2);
        }
        this.m = new S60(wt);
    }
}
