导航菜单

页面标题

页面副标题

Atlys v4.8.7 - C3494a.java 源代码

正在查看: Atlys v4.8.7 应用的 C3494a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package fm;

import Am.C0088g;
import D0.InterfaceC0454d0;
import D0.U;
import G.p;
import Hd.I0;
import Q6.C1207q0;
import V.AbstractC1398l;
import V.G;
import V.m;
import Ya.s;
import android.app.ActivityManager;
import android.app.KeyguardManager;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Process;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import androidx.core.graphics.drawable.IconCompat;
import b0.C2260u;
import b2.u;
import b2.v;
import b3.AbstractC2309h;
import b3.C2324x;
import be.AbstractC2415b;
import c2.AbstractC2606h;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.freshchat.consumer.sdk.beans.config.DefaultRefreshIntervals;
import com.google.android.gms.cloudmessaging.CloudMessagingReceiver;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.util.PlatformVersion;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.tasks.Tasks;
import com.google.protobuf.InvalidProtocolBufferException;
import dc.o;
import e3.AbstractC3270b;
import fm.C3494a;
import g4.C3546x;
import gb.InterfaceC3661a;
import gb.InterfaceC3662b;
import gb.InterfaceC3663c;
import hf.t;
import i1.C3932d;
import j$.util.concurrent.ConcurrentHashMap;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import jf.r;
import jf.x;
import kf.C4592b;
import kf.h;
import kf.i;
import kf.l;
import kf.n;
import m1.InterfaceC4786s;
import n3.w;
import o1.C5118r;
import o1.C5120t;
import of.AbstractC5224g;
import of.AbstractC5230m;
import of.ExecutorC5222e;
import of.InterfaceC5226i;
import ok.C5243e;
import q2.C5494e;
import q2.InterfaceC5493d;
import re.RunnableC5872a;
import sm.C6043d;
import ta.C6149g;
import ta.C6150h;
import ta.InterfaceC6165x;
import u.C6198a;
import xl.AbstractC6651l;

public final class C3494a implements InterfaceC5493d, ReadableMapKeySetIterator, InterfaceC6165x {

    public final Object f47086a;

    public Object f47087b;

    public Object f47088c;

    public C3494a(ReadableMapKeySetIterator readableMapKeySetIterator, C5243e c5243e) {
        this.f47086a = readableMapKeySetIterator;
        this.f47087b = c5243e;
        g();
    }

    public static n3.e e(C2324x c2324x) {
        boolean z10 = false;
        C0088g c0088g = new C0088g(9, (byte) 0);
        c0088g.f692e = null;
        Uri uri = c2324x.f33898b;
        U u10 = new U(uri == null ? null : uri.toString(), c2324x.f33902f, c0088g);
        I0 it = c2324x.f33899c.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry entry = (Map.Entry) it.next();
            String str = (String) entry.getKey();
            String str2 = (String) entry.getValue();
            str.getClass();
            str2.getClass();
            synchronized (((HashMap) u10.f6284e)) {
                ((HashMap) u10.f6284e).put(str, str2);
            }
        }
        HashMap hashMap = new HashMap();
        UUID uuid = AbstractC2309h.f33781a;
        Yo.g gVar = new Yo.g(z10);
        UUID uuid2 = c2324x.f33897a;
        C6198a c6198a = w.f56283d;
        uuid2.getClass();
        boolean z11 = c2324x.f33900d;
        boolean z12 = c2324x.f33901e;
        int[] B02 = AbstractC2415b.B0(c2324x.f33903g);
        int length = B02.length;
        for (int i10 = 0; i10 < length; i10++) {
            int i11 = B02[i10];
            AbstractC3270b.f(i11 == 2 || i11 == 1);
        }
        n3.e eVar = new n3.e(uuid2, c6198a, u10, hashMap, z11, (int[]) B02.clone(), z12, gVar, DefaultRefreshIntervals.RESPONSE_TIME_EXPECTATIONS_FETCH_INTERVAL);
        byte[] bArr = c2324x.f33904h;
        byte[] copyOf = bArr != null ? Arrays.copyOf(bArr, bArr.length) : null;
        AbstractC3270b.k(eVar.l.isEmpty());
        eVar.f56258u = 0;
        eVar.f56259v = copyOf;
        return eVar;
    }

    @Override
    public void a() {
        C6149g c6149g = C6149g.f63836c;
        ((InterfaceC0454d0) this.f47086a).setValue(C6149g.f63836c);
    }

    @Override
    public Object acquire() {
        Object acquire = ((InterfaceC5493d) this.f47088c).acquire();
        if (acquire == null) {
            acquire = ((InterfaceC3661a) this.f47086a).create();
            if (Log.isLoggable("FactoryPools", 2)) {
                Log.v("FactoryPools", "Created new " + acquire.getClass());
            }
        }
        if (acquire instanceof InterfaceC3662b) {
            ((InterfaceC3662b) acquire).b().f48041a = false;
        }
        return acquire;
    }

    @Override
    public void b(C6150h c6150h) {
        ((InterfaceC0454d0) this.f47087b).setValue(c6150h);
        ((InterfaceC0454d0) this.f47086a).setValue(c6150h.f63839a);
        Bitmap bitmap = c6150h.f63840b;
        ((InterfaceC0454d0) this.f47088c).setValue(new V0.e(p.o(bitmap.getWidth(), bitmap.getHeight())));
    }

    public void c(l lVar, kf.p pVar) {
        o.M(!pVar.equals(kf.p.f54103b), "Cannot add document to the RemoteDocumentCache with a read time of zero", new Object[0]);
        mf.c D2 = ((t) this.f47087b).D(lVar);
        h hVar = lVar.f54094a;
        String N10 = da.t.N(hVar.f54087a);
        Integer valueOf = Integer.valueOf(hVar.f54087a.f54081a.size());
        be.o oVar = pVar.f54104a;
        ((x) this.f47086a).b("INSERT OR REPLACE INTO remote_documents (path, path_length, read_time_seconds, read_time_nanos, contents) VALUES (?, ?, ?, ?, ?)", N10, valueOf, Long.valueOf(oVar.f34409a), Integer.valueOf(oVar.f34410b), D2.toByteArray());
        ((r) this.f47088c).a((n) hVar.f54087a.k());
    }

    public void d(long j2, C5118r c5118r, boolean z10) {
        long[] jArr;
        boolean z11;
        long[] jArr2;
        boolean z12;
        int i10;
        C3932d c3932d;
        C3932d c3932d2;
        C2260u c2260u = (C2260u) this.f47087b;
        V.t tVar = (V.t) this.f47088c;
        tVar.f24232e = 0;
        long[] jArr3 = tVar.f24228a;
        char c10 = 7;
        if (jArr3 != G.f24165a) {
            AbstractC6651l.j0(jArr3);
            long[] jArr4 = tVar.f24228a;
            int i11 = tVar.f24231d;
            int i12 = i11 >> 3;
            long j10 = 255 << ((i11 & 7) << 3);
            jArr4[i12] = j10 | (jArr4[i12] & (~j10));
        }
        int i13 = 0;
        AbstractC6651l.i0(tVar.f24230c, null, 0, tVar.f24231d);
        tVar.f24233f = G.c(tVar.f24231d) - tVar.f24232e;
        int i14 = c5118r.f57426d;
        boolean z13 = true;
        C2260u c2260u2 = c2260u;
        boolean z14 = true;
        int i15 = 0;
        while (i15 < i14) {
            P0.p pVar = (P0.p) c5118r.get(i15);
            if (z14) {
                F0.d dVar = c2260u2.f33430a;
                int i16 = dVar.f8858c;
                if (i16 > 0) {
                    ?? r15 = dVar.f8856a;
                    int i17 = i13;
                    while (true) {
                        c3932d2 = r15[i17];
                        if (kotlin.jvm.internal.l.c(((C3932d) c3932d2).f49640b, pVar)) {
                            break;
                        }
                        int i18 = i17 + 1;
                        if (i18 >= i16) {
                            break;
                        } else {
                            i17 = i18;
                        }
                    }
                    c3932d = c3932d2;
                    if (c3932d == null) {
                        c3932d.f49646h = true;
                        c3932d.f49641c.b(j2);
                        Object c11 = tVar.c(j2);
                        Object obj = c11;
                        if (c11 == null) {
                            V.x xVar = new V.x();
                            tVar.e(j2, xVar);
                            obj = xVar;
                        }
                        ((V.x) obj).a(c3932d);
                        c2260u2 = c3932d;
                        i15++;
                        i13 = 0;
                    } else {
                        z14 = false;
                    }
                }
                c3932d2 = 0;
                c3932d = c3932d2;
                if (c3932d == null) {
                }
            }
            c3932d = new C3932d(pVar);
            c3932d.f49641c.b(j2);
            Object c12 = tVar.c(j2);
            Object obj2 = c12;
            if (c12 == null) {
                V.x xVar2 = new V.x();
                tVar.e(j2, xVar2);
                obj2 = xVar2;
            }
            ((V.x) obj2).a(c3932d);
            c2260u2.f33430a.b(c3932d);
            c2260u2 = c3932d;
            i15++;
            i13 = 0;
        }
        if (!z10) {
            return;
        }
        long[] jArr5 = tVar.f24229b;
        Object[] objArr = tVar.f24230c;
        long[] jArr6 = tVar.f24228a;
        int length = jArr6.length - 2;
        if (length < 0) {
            return;
        }
        int i19 = 0;
        while (true) {
            long j11 = jArr6[i19];
            if ((((~j11) << c10) & j11 & (-9187201950435737472L)) != -9187201950435737472L) {
                int i20 = 8;
                int i21 = 8 - ((~(i19 - length)) >>> 31);
                int i22 = 0;
                while (i22 < i21) {
                    if ((j11 & 255) < 128) {
                        int i23 = (i19 << 3) + i22;
                        long j12 = jArr5[i23];
                        V.x xVar3 = (V.x) objArr[i23];
                        F0.d dVar2 = c2260u.f33430a;
                        int i24 = dVar2.f8858c;
                        if (i24 > 0) {
                            Object[] objArr2 = dVar2.f8856a;
                            int i25 = 0;
                            while (true) {
                                ((C3932d) objArr2[i25]).i(j12, xVar3);
                                jArr2 = jArr5;
                                z12 = true;
                                int i26 = i25 + 1;
                                if (i26 >= i24) {
                                    break;
                                }
                                i25 = i26;
                                jArr5 = jArr2;
                            }
                        } else {
                            jArr2 = jArr5;
                            z12 = true;
                        }
                        i10 = 8;
                    } else {
                        jArr2 = jArr5;
                        z12 = z13;
                        i10 = i20;
                    }
                    j11 >>= i10;
                    i22++;
                    z13 = z12;
                    i20 = i10;
                    jArr5 = jArr2;
                }
                jArr = jArr5;
                z11 = z13;
                if (i21 != i20) {
                    return;
                }
            } else {
                jArr = jArr5;
                z11 = z13;
            }
            if (i19 == length) {
                return;
            }
            i19++;
            z13 = z11;
            jArr5 = jArr;
            c10 = 7;
        }
    }

    public boolean f(s sVar, boolean z10) {
        boolean z11;
        boolean z12;
        C2260u c2260u = (C2260u) this.f47087b;
        if (!c2260u.a((m) sVar.f27950c, (InterfaceC4786s) this.f47086a, sVar, z10)) {
            return false;
        }
        F0.d dVar = c2260u.f33430a;
        int i10 = dVar.f8858c;
        if (i10 > 0) {
            Object[] objArr = dVar.f8856a;
            int i11 = 0;
            z11 = false;
            do {
                z11 = ((C3932d) objArr[i11]).h(sVar, z10) || z11;
                i11++;
            } while (i11 < i10);
        } else {
            z11 = false;
        }
        int i12 = dVar.f8858c;
        if (i12 > 0) {
            Object[] objArr2 = dVar.f8856a;
            int i13 = 0;
            z12 = false;
            do {
                z12 = ((C3932d) objArr2[i13]).g(sVar) || z12;
                i13++;
            } while (i13 < i12);
        } else {
            z12 = false;
        }
        c2260u.c(sVar);
        return z12 || z11;
    }

    public void g() {
        String nextKey;
        do {
            ReadableMapKeySetIterator readableMapKeySetIterator = (ReadableMapKeySetIterator) this.f47086a;
            if (!readableMapKeySetIterator.hasNextKey()) {
                this.f47088c = null;
                return;
            } else {
                nextKey = readableMapKeySetIterator.nextKey();
                this.f47088c = nextKey;
                kotlin.jvm.internal.l.e(nextKey);
            }
        } while (!((C5243e) this.f47087b).a(nextKey));
    }

    public l h(h hVar) {
        return (l) i(Collections.singletonList(hVar)).get(hVar);
    }

    @Override
    public boolean hasNextKey() {
        return ((String) this.f47088c) != null;
    }

    public HashMap i(Iterable iterable) {
        HashMap hashMap = new HashMap();
        ArrayList arrayList = new ArrayList();
        Iterator it = iterable.iterator();
        while (it.hasNext()) {
            h hVar = (h) it.next();
            arrayList.add(da.t.N(hVar.f54087a));
            hashMap.put(hVar, l.e(hVar));
        }
        Gg.l lVar = new Gg.l((x) this.f47086a, arrayList);
        ExecutorC5222e executorC5222e = new ExecutorC5222e();
        while (((Iterator) lVar.f10399f).hasNext()) {
            Cursor n10 = lVar.a().n();
            while (n10.moveToNext()) {
                try {
                    n(executorC5222e, hashMap, n10, null);
                } catch (Throwable th2) {
                    if (n10 != null) {
                        try {
                            n10.close();
                        } catch (Throwable th3) {
                            th2.addSuppressed(th3);
                        }
                    }
                    throw th2;
                }
            }
            n10.close();
        }
        executorC5222e.a();
        return hashMap;
    }

    public HashMap j(List list, C4592b c4592b, int i10, Af.e eVar, Yk.a aVar) {
        be.o oVar = c4592b.f54074a.f54104a;
        StringBuilder g10 = AbstractC5230m.g("SELECT contents, read_time_seconds, read_time_nanos, path FROM remote_documents WHERE path >= ? AND path < ? AND path_length = ? AND (read_time_seconds > ? OR ( read_time_seconds = ? AND read_time_nanos > ?) OR ( read_time_seconds = ? AND read_time_nanos = ? and path > ?)) ", " UNION ", list.size());
        g10.append("ORDER BY read_time_seconds, read_time_nanos, path LIMIT ?");
        char c10 = 1;
        Object[] objArr = new Object[(list.size() * 9) + 1];
        Iterator it = list.iterator();
        int i11 = 0;
        while (it.hasNext()) {
            n nVar = (n) it.next();
            String N10 = da.t.N(nVar);
            int i12 = i11 + 1;
            objArr[i11] = N10;
            int i13 = i11 + 2;
            StringBuilder sb2 = new StringBuilder(N10);
            int length = sb2.length() - c10;
            char charAt = sb2.charAt(length);
            Iterator it2 = it;
            o.M(charAt == c10 ? c10 : 0, "successor may only operate on paths generated by encode", new Object[0]);
            sb2.setCharAt(length, (char) (charAt + 1));
            objArr[i12] = sb2.toString();
            objArr[i13] = Integer.valueOf(nVar.f54081a.size() + 1);
            objArr[i11 + 3] = Long.valueOf(oVar.f34409a);
            long j2 = oVar.f34409a;
            objArr[i11 + 4] = Long.valueOf(j2);
            int i14 = oVar.f34410b;
            objArr[i11 + 5] = Integer.valueOf(i14);
            objArr[i11 + 6] = Long.valueOf(j2);
            int i15 = i11 + 8;
            objArr[i11 + 7] = Integer.valueOf(i14);
            i11 += 9;
            objArr[i15] = da.t.N(c4592b.f54075b.f54087a);
            it = it2;
            c10 = 1;
        }
        objArr[i11] = Integer.valueOf(i10);
        ExecutorC5222e executorC5222e = new ExecutorC5222e();
        HashMap hashMap = new HashMap();
        C3546x k2 = ((x) this.f47086a).k(g10.toString());
        k2.c(objArr);
        Cursor n10 = k2.n();
        while (n10.moveToNext()) {
            try {
                n(executorC5222e, hashMap, n10, eVar);
            } finally {
            }
        }
        n10.close();
        executorC5222e.a();
        return hashMap;
    }

    public Map k(String str, C4592b c4592b, int i10) {
        int i11 = 1;
        List c10 = ((r) this.f47088c).c(str);
        ArrayList arrayList = new ArrayList(c10.size());
        Iterator it = c10.iterator();
        while (it.hasNext()) {
            arrayList.add((n) ((n) it.next()).a(str));
        }
        if (arrayList.isEmpty()) {
            return Collections.emptyMap();
        }
        if (arrayList.size() * 9 < 900) {
            return j(arrayList, c4592b, i10, null, null);
        }
        HashMap hashMap = new HashMap();
        int i12 = 0;
        while (i12 < arrayList.size()) {
            int i13 = i12 + 100;
            hashMap.putAll(j(arrayList.subList(i12, Math.min(arrayList.size(), i13)), c4592b, i10, null, null));
            i12 = i13;
        }
        Be.a aVar = C4592b.f54073e;
        int i14 = AbstractC5230m.f58087a;
        if (hashMap.size() > i10) {
            ArrayList arrayList2 = new ArrayList(hashMap.entrySet());
            Collections.sort(arrayList2, new i(aVar, i11));
            hashMap = new HashMap();
            for (int i15 = 0; i15 < i10; i15++) {
                hashMap.put(((Map.Entry) arrayList2.get(i15)).getKey(), ((Map.Entry) arrayList2.get(i15)).getValue());
            }
        }
        return hashMap;
    }

    public HashMap l(hf.w wVar, C4592b c4592b, Set set, Yk.a aVar) {
        return j(Collections.singletonList(wVar.f49261e), c4592b, Integer.MAX_VALUE, new Af.e(wVar, set, 28), aVar);
    }

    public boolean m() {
        yf.l lVar;
        Context context;
        oe.o oVar;
        Bundle bundle;
        NotificationChannel notificationChannel;
        String string;
        NotificationChannel notificationChannel2;
        NotificationChannel notificationChannel3;
        String packageName;
        PackageManager packageManager;
        String r10;
        String r11;
        String s10;
        int i10;
        int i11;
        String s11;
        Uri defaultUri;
        String s12;
        Intent launchIntentForPackage;
        PendingIntent activity;
        PendingIntent broadcast;
        String s13;
        Integer valueOf;
        String s14;
        Integer l;
        Integer l10;
        Integer l11;
        Long q10;
        long[] t10;
        int[] n10;
        char c10;
        ?? r02;
        String s15;
        IconCompat iconCompat;
        boolean z10;
        int i12;
        ApplicationInfo applicationInfo;
        if (((oe.o) this.f47088c).k("gcm.n.noui")) {
            return true;
        }
        Context context2 = (Context) this.f47087b;
        if (!((KeyguardManager) context2.getSystemService("keyguard")).inKeyguardRestrictedInputMode()) {
            if (!PlatformVersion.isAtLeastLollipop()) {
                SystemClock.sleep(10L);
            }
            int myPid = Process.myPid();
            List<ActivityManager.RunningAppProcessInfo> runningAppProcesses = ((ActivityManager) context2.getSystemService("activity")).getRunningAppProcesses();
            if (runningAppProcesses != null) {
                Iterator<ActivityManager.RunningAppProcessInfo> it = runningAppProcesses.iterator();
                while (true) {
                    if (!it.hasNext()) {
                        break;
                    }
                    ActivityManager.RunningAppProcessInfo next = it.next();
                    if (next.pid == myPid) {
                        if (next.importance == 100) {
                            return false;
                        }
                    }
                }
            }
        }
        String s16 = ((oe.o) this.f47088c).s("gcm.n.image");
        if (!TextUtils.isEmpty(s16)) {
            try {
                lVar = new yf.l(new URL(s16));
            } catch (MalformedURLException unused) {
                Log.w("FirebaseMessaging", "Not downloading image, bad URL: " + s16);
            }
            if (lVar != null) {
                ExecutorService executorService = (ExecutorService) this.f47086a;
                TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
                lVar.f68354b = executorService.submit(new RunnableC5872a(lVar, taskCompletionSource, 20));
                lVar.f68355c = taskCompletionSource.getTask();
            }
            context = (Context) this.f47087b;
            oVar = (oe.o) this.f47088c;
            AtomicInteger atomicInteger = yf.e.f68337a;
            applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128);
            if (applicationInfo != null) {
                bundle = applicationInfo.metaData;
            }
            bundle = Bundle.EMPTY;
            Bundle bundle2 = bundle;
            String s17 = oVar.s("gcm.n.android_channel_id");
            if (Build.VERSION.SDK_INT >= 26) {
                if (context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).targetSdkVersion >= 26) {
                    NotificationManager notificationManager = (NotificationManager) context.getSystemService(NotificationManager.class);
                    if (!TextUtils.isEmpty(s17)) {
                        notificationChannel3 = notificationManager.getNotificationChannel(s17);
                        if (notificationChannel3 == null) {
                            Log.w("FirebaseMessaging", "Notification Channel requested (" + s17 + ") has not been created by the app. Manifest configuration, or default, value will be used.");
                        }
                        packageName = context.getPackageName();
                        Resources resources = context.getResources();
                        packageManager = context.getPackageManager();
                        b2.x xVar = new b2.x(context, s17);
                        r10 = oVar.r(resources, packageName, "gcm.n.title");
                        if (!TextUtils.isEmpty(r10)) {
                            xVar.f33539e = b2.x.b(r10);
                        }
                        r11 = oVar.r(resources, packageName, "gcm.n.body");
                        if (!TextUtils.isEmpty(r11)) {
                            xVar.f33540f = b2.x.b(r11);
                            v vVar = new v();
                            vVar.f33534d = b2.x.b(r11);
                            xVar.e(vVar);
                        }
                        s10 = oVar.s("gcm.n.icon");
                        if (!TextUtils.isEmpty(s10)) {
                            i11 = resources.getIdentifier(s10, "drawable", packageName);
                            if ((i11 == 0 || !yf.e.a(resources, i11)) && ((i11 = resources.getIdentifier(s10, "mipmap", packageName)) == 0 || !yf.e.a(resources, i11))) {
                                Log.w("FirebaseMessaging", "Icon resource " + s10 + " not found. Notification will use default icon.");
                            }
                            xVar.f33552s.icon = i11;
                            s11 = oVar.s("gcm.n.sound2");
                            if (TextUtils.isEmpty(s11)) {
                                s11 = oVar.s("gcm.n.sound");
                            }
                            if (!TextUtils.isEmpty(s11)) {
                                defaultUri = null;
                            } else if ("default".equals(s11) || resources.getIdentifier(s11, "raw", packageName) == 0) {
                                defaultUri = RingtoneManager.getDefaultUri(2);
                            } else {
                                defaultUri = Uri.parse("android.resource://" + packageName + "/raw/" + s11);
                            }
                            if (defaultUri != null) {
                                Notification notification = xVar.f33552s;
                                notification.sound = defaultUri;
                                notification.audioStreamType = -1;
                                notification.audioAttributes = b2.w.a(b2.w.e(b2.w.c(b2.w.b(), 4), 5));
                            }
                            s12 = oVar.s("gcm.n.click_action");
                            if (TextUtils.isEmpty(s12)) {
                                launchIntentForPackage = new Intent(s12);
                                launchIntentForPackage.setPackage(packageName);
                                launchIntentForPackage.setFlags(268435456);
                            } else {
                                String s18 = oVar.s("gcm.n.link_android");
                                if (TextUtils.isEmpty(s18)) {
                                    s18 = oVar.s("gcm.n.link");
                                }
                                Uri parse = !TextUtils.isEmpty(s18) ? Uri.parse(s18) : null;
                                if (parse != null) {
                                    launchIntentForPackage = new Intent("android.intent.action.VIEW");
                                    launchIntentForPackage.setPackage(packageName);
                                    launchIntentForPackage.setData(parse);
                                } else {
                                    launchIntentForPackage = packageManager.getLaunchIntentForPackage(packageName);
                                    if (launchIntentForPackage == null) {
                                        Log.w("FirebaseMessaging", "No activity found to launch app");
                                    }
                                }
                            }
                            AtomicInteger atomicInteger2 = yf.e.f68337a;
                            if (launchIntentForPackage != null) {
                                activity = null;
                            } else {
                                launchIntentForPackage.addFlags(67108864);
                                Bundle bundle3 = (Bundle) oVar.f58033a;
                                Bundle bundle4 = new Bundle(bundle3);
                                for (String str : bundle3.keySet()) {
                                    if (str.startsWith("google.c.") || str.startsWith("gcm.n.") || str.startsWith("gcm.notification.")) {
                                        bundle4.remove(str);
                                    }
                                }
                                launchIntentForPackage.putExtras(bundle4);
                                if (oVar.k("google.c.a.e")) {
                                    launchIntentForPackage.putExtra("gcm.n.analytics_data", oVar.v());
                                }
                                activity = PendingIntent.getActivity(context, atomicInteger2.incrementAndGet(), launchIntentForPackage, 1140850688);
                            }
                            xVar.f33541g = activity;
                            broadcast = oVar.k("google.c.a.e") ? null : PendingIntent.getBroadcast(context, atomicInteger2.incrementAndGet(), new Intent("com.google.android.c2dm.intent.RECEIVE").setPackage(context.getPackageName()).putExtra(CloudMessagingReceiver.IntentKeys.WRAPPED_INTENT, new Intent(CloudMessagingReceiver.IntentActionKeys.NOTIFICATION_DISMISS).putExtras(oVar.v())), 1140850688);
                            if (broadcast != null) {
                                xVar.f33552s.deleteIntent = broadcast;
                            }
                            s13 = oVar.s("gcm.n.color");
                            if (!TextUtils.isEmpty(s13)) {
                                try {
                                    valueOf = Integer.valueOf(Color.parseColor(s13));
                                } catch (IllegalArgumentException unused2) {
                                    Log.w("FirebaseMessaging", "Color is invalid: " + s13 + ". Notification will use default color.");
                                }
                                if (valueOf != null) {
                                    xVar.f33548o = valueOf.intValue();
                                }
                                xVar.c(!oVar.k("gcm.n.sticky"));
                                xVar.f33546m = oVar.k("gcm.n.local_only");
                                s14 = oVar.s("gcm.n.ticker");
                                if (s14 != null) {
                                    xVar.f33552s.tickerText = b2.x.b(s14);
                                }
                                l = oVar.l("gcm.n.notification_priority");
                                if (l != null) {
                                    if (l.intValue() < -2 || l.intValue() > 2) {
                                        Log.w("FirebaseMessaging", "notificationPriority is invalid " + l + ". Skipping setting notificationPriority.");
                                    }
                                    if (l != null) {
                                        xVar.f33544j = l.intValue();
                                    }
                                    l10 = oVar.l("gcm.n.visibility");
                                    if (l10 != null) {
                                        if (l10.intValue() < -1 || l10.intValue() > 1) {
                                            Log.w("NotificationParams", "visibility is invalid: " + l10 + ". Skipping setting visibility.");
                                        }
                                        if (l10 != null) {
                                            xVar.f33549p = l10.intValue();
                                        }
                                        l11 = oVar.l("gcm.n.notification_count");
                                        if (l11 != null) {
                                            if (l11.intValue() < 0) {
                                                Log.w("FirebaseMessaging", "notificationCount is invalid: " + l11 + ". Skipping setting notificationCount.");
                                            }
                                            if (l11 != null) {
                                                xVar.f33543i = l11.intValue();
                                            }
                                            q10 = oVar.q();
                                            if (q10 != null) {
                                                xVar.f33545k = true;
                                                xVar.f33552s.when = q10.longValue();
                                            }
                                            t10 = oVar.t();
                                            if (t10 != null) {
                                                xVar.f33552s.vibrate = t10;
                                            }
                                            n10 = oVar.n();
                                            if (n10 != null) {
                                                int i13 = n10[0];
                                                int i14 = n10[1];
                                                int i15 = n10[2];
                                                Notification notification2 = xVar.f33552s;
                                                notification2.ledARGB = i13;
                                                notification2.ledOnMS = i14;
                                                notification2.ledOffMS = i15;
                                                notification2.flags = ((i14 == 0 || i15 == 0) ? 0 : 1) | ((-2) & notification2.flags);
                                            }
                                            boolean k2 = oVar.k("gcm.n.default_sound");
                                            boolean z11 = k2;
                                            if (oVar.k("gcm.n.default_vibrate_timings")) {
                                                z11 = (k2 ? 1 : 0) | 2;
                                            }
                                            if (oVar.k("gcm.n.default_light_settings")) {
                                                c10 = 4;
                                                r02 = (z11 ? 1 : 0) | 4;
                                            } else {
                                                c10 = 4;
                                                r02 = z11;
                                            }
                                            Notification notification3 = xVar.f33552s;
                                            notification3.defaults = r02;
                                            if ((r02 & c10) != 0) {
                                                notification3.flags |= 1;
                                            }
                                            s15 = oVar.s("gcm.n.tag");
                                            if (TextUtils.isEmpty(s15)) {
                                                s15 = "FCM-Notification:" + SystemClock.uptimeMillis();
                                            }
                                            String str2 = s15;
                                            if (lVar != null) {
                                                try {
                                                    Bitmap bitmap = (Bitmap) Tasks.await((Task) Preconditions.checkNotNull(lVar.f68355c), 5L, TimeUnit.SECONDS);
                                                    xVar.d(bitmap);
                                                    u uVar = new u();
                                                    if (bitmap == null) {
                                                        iconCompat = null;
                                                        z10 = true;
                                                    } else {
                                                        z10 = true;
                                                        iconCompat = new IconCompat(1);
                                                        iconCompat.f31452b = bitmap;
                                                    }
                                                    uVar.f33531d = iconCompat;
                                                    uVar.f33532e = null;
                                                    uVar.f33533f = z10;
                                                    xVar.e(uVar);
                                                } catch (InterruptedException unused3) {
                                                    Log.w("FirebaseMessaging", "Interrupted while downloading image, showing notification without it");
                                                    lVar.close();
                                                    Thread.currentThread().interrupt();
                                                } catch (ExecutionException e4) {
                                                    Log.w("FirebaseMessaging", "Failed to download image: " + e4.getCause());
                                                } catch (TimeoutException unused4) {
                                                    Log.w("FirebaseMessaging", "Failed to download image in time, showing notification without it");
                                                    lVar.close();
                                                }
                                            }
                                            if (Log.isLoggable("FirebaseMessaging", 3)) {
                                                Log.d("FirebaseMessaging", "Showing notification");
                                            }
                                            ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str2, 0, xVar.a());
                                            return true;
                                        }
                                        l11 = null;
                                        if (l11 != null) {
                                        }
                                        q10 = oVar.q();
                                        if (q10 != null) {
                                        }
                                        t10 = oVar.t();
                                        if (t10 != null) {
                                        }
                                        n10 = oVar.n();
                                        if (n10 != null) {
                                        }
                                        boolean k22 = oVar.k("gcm.n.default_sound");
                                        boolean z112 = k22;
                                        if (oVar.k("gcm.n.default_vibrate_timings")) {
                                        }
                                        if (oVar.k("gcm.n.default_light_settings")) {
                                        }
                                        Notification notification32 = xVar.f33552s;
                                        notification32.defaults = r02;
                                        if ((r02 & c10) != 0) {
                                        }
                                        s15 = oVar.s("gcm.n.tag");
                                        if (TextUtils.isEmpty(s15)) {
                                        }
                                        String str22 = s15;
                                        if (lVar != null) {
                                        }
                                        if (Log.isLoggable("FirebaseMessaging", 3)) {
                                        }
                                        ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str22, 0, xVar.a());
                                        return true;
                                    }
                                    l10 = null;
                                    if (l10 != null) {
                                    }
                                    l11 = oVar.l("gcm.n.notification_count");
                                    if (l11 != null) {
                                    }
                                    l11 = null;
                                    if (l11 != null) {
                                    }
                                    q10 = oVar.q();
                                    if (q10 != null) {
                                    }
                                    t10 = oVar.t();
                                    if (t10 != null) {
                                    }
                                    n10 = oVar.n();
                                    if (n10 != null) {
                                    }
                                    boolean k222 = oVar.k("gcm.n.default_sound");
                                    boolean z1122 = k222;
                                    if (oVar.k("gcm.n.default_vibrate_timings")) {
                                    }
                                    if (oVar.k("gcm.n.default_light_settings")) {
                                    }
                                    Notification notification322 = xVar.f33552s;
                                    notification322.defaults = r02;
                                    if ((r02 & c10) != 0) {
                                    }
                                    s15 = oVar.s("gcm.n.tag");
                                    if (TextUtils.isEmpty(s15)) {
                                    }
                                    String str222 = s15;
                                    if (lVar != null) {
                                    }
                                    if (Log.isLoggable("FirebaseMessaging", 3)) {
                                    }
                                    ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str222, 0, xVar.a());
                                    return true;
                                }
                                l = null;
                                if (l != null) {
                                }
                                l10 = oVar.l("gcm.n.visibility");
                                if (l10 != null) {
                                }
                                l10 = null;
                                if (l10 != null) {
                                }
                                l11 = oVar.l("gcm.n.notification_count");
                                if (l11 != null) {
                                }
                                l11 = null;
                                if (l11 != null) {
                                }
                                q10 = oVar.q();
                                if (q10 != null) {
                                }
                                t10 = oVar.t();
                                if (t10 != null) {
                                }
                                n10 = oVar.n();
                                if (n10 != null) {
                                }
                                boolean k2222 = oVar.k("gcm.n.default_sound");
                                boolean z11222 = k2222;
                                if (oVar.k("gcm.n.default_vibrate_timings")) {
                                }
                                if (oVar.k("gcm.n.default_light_settings")) {
                                }
                                Notification notification3222 = xVar.f33552s;
                                notification3222.defaults = r02;
                                if ((r02 & c10) != 0) {
                                }
                                s15 = oVar.s("gcm.n.tag");
                                if (TextUtils.isEmpty(s15)) {
                                }
                                String str2222 = s15;
                                if (lVar != null) {
                                }
                                if (Log.isLoggable("FirebaseMessaging", 3)) {
                                }
                                ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str2222, 0, xVar.a());
                                return true;
                            }
                            i12 = bundle2.getInt("com.google.firebase.messaging.default_notification_color", 0);
                            if (i12 != 0) {
                                try {
                                    valueOf = Integer.valueOf(AbstractC2606h.getColor(context, i12));
                                } catch (Resources.NotFoundException unused5) {
                                    Log.w("FirebaseMessaging", "Cannot find the color resource referenced in AndroidManifest.");
                                }
                                if (valueOf != null) {
                                }
                                xVar.c(!oVar.k("gcm.n.sticky"));
                                xVar.f33546m = oVar.k("gcm.n.local_only");
                                s14 = oVar.s("gcm.n.ticker");
                                if (s14 != null) {
                                }
                                l = oVar.l("gcm.n.notification_priority");
                                if (l != null) {
                                }
                                l = null;
                                if (l != null) {
                                }
                                l10 = oVar.l("gcm.n.visibility");
                                if (l10 != null) {
                                }
                                l10 = null;
                                if (l10 != null) {
                                }
                                l11 = oVar.l("gcm.n.notification_count");
                                if (l11 != null) {
                                }
                                l11 = null;
                                if (l11 != null) {
                                }
                                q10 = oVar.q();
                                if (q10 != null) {
                                }
                                t10 = oVar.t();
                                if (t10 != null) {
                                }
                                n10 = oVar.n();
                                if (n10 != null) {
                                }
                                boolean k22222 = oVar.k("gcm.n.default_sound");
                                boolean z112222 = k22222;
                                if (oVar.k("gcm.n.default_vibrate_timings")) {
                                }
                                if (oVar.k("gcm.n.default_light_settings")) {
                                }
                                Notification notification32222 = xVar.f33552s;
                                notification32222.defaults = r02;
                                if ((r02 & c10) != 0) {
                                }
                                s15 = oVar.s("gcm.n.tag");
                                if (TextUtils.isEmpty(s15)) {
                                }
                                String str22222 = s15;
                                if (lVar != null) {
                                }
                                if (Log.isLoggable("FirebaseMessaging", 3)) {
                                }
                                ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str22222, 0, xVar.a());
                                return true;
                            }
                            valueOf = null;
                            if (valueOf != null) {
                            }
                            xVar.c(!oVar.k("gcm.n.sticky"));
                            xVar.f33546m = oVar.k("gcm.n.local_only");
                            s14 = oVar.s("gcm.n.ticker");
                            if (s14 != null) {
                            }
                            l = oVar.l("gcm.n.notification_priority");
                            if (l != null) {
                            }
                            l = null;
                            if (l != null) {
                            }
                            l10 = oVar.l("gcm.n.visibility");
                            if (l10 != null) {
                            }
                            l10 = null;
                            if (l10 != null) {
                            }
                            l11 = oVar.l("gcm.n.notification_count");
                            if (l11 != null) {
                            }
                            l11 = null;
                            if (l11 != null) {
                            }
                            q10 = oVar.q();
                            if (q10 != null) {
                            }
                            t10 = oVar.t();
                            if (t10 != null) {
                            }
                            n10 = oVar.n();
                            if (n10 != null) {
                            }
                            boolean k222222 = oVar.k("gcm.n.default_sound");
                            boolean z1122222 = k222222;
                            if (oVar.k("gcm.n.default_vibrate_timings")) {
                            }
                            if (oVar.k("gcm.n.default_light_settings")) {
                            }
                            Notification notification322222 = xVar.f33552s;
                            notification322222.defaults = r02;
                            if ((r02 & c10) != 0) {
                            }
                            s15 = oVar.s("gcm.n.tag");
                            if (TextUtils.isEmpty(s15)) {
                            }
                            String str222222 = s15;
                            if (lVar != null) {
                            }
                            if (Log.isLoggable("FirebaseMessaging", 3)) {
                            }
                            ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str222222, 0, xVar.a());
                            return true;
                        }
                        i10 = bundle2.getInt("com.google.firebase.messaging.default_notification_icon", 0);
                        if (i10 != 0 || !yf.e.a(resources, i10)) {
                            i10 = packageManager.getApplicationInfo(packageName, 0).icon;
                        }
                        i11 = (i10 == 0 && yf.e.a(resources, i10)) ? i10 : 17301651;
                        xVar.f33552s.icon = i11;
                        s11 = oVar.s("gcm.n.sound2");
                        if (TextUtils.isEmpty(s11)) {
                        }
                        if (!TextUtils.isEmpty(s11)) {
                        }
                        if (defaultUri != null) {
                        }
                        s12 = oVar.s("gcm.n.click_action");
                        if (TextUtils.isEmpty(s12)) {
                        }
                        AtomicInteger atomicInteger22 = yf.e.f68337a;
                        if (launchIntentForPackage != null) {
                        }
                        xVar.f33541g = activity;
                        if (oVar.k("google.c.a.e")) {
                        }
                        if (broadcast != null) {
                        }
                        s13 = oVar.s("gcm.n.color");
                        if (!TextUtils.isEmpty(s13)) {
                        }
                        i12 = bundle2.getInt("com.google.firebase.messaging.default_notification_color", 0);
                        if (i12 != 0) {
                        }
                        valueOf = null;
                        if (valueOf != null) {
                        }
                        xVar.c(!oVar.k("gcm.n.sticky"));
                        xVar.f33546m = oVar.k("gcm.n.local_only");
                        s14 = oVar.s("gcm.n.ticker");
                        if (s14 != null) {
                        }
                        l = oVar.l("gcm.n.notification_priority");
                        if (l != null) {
                        }
                        l = null;
                        if (l != null) {
                        }
                        l10 = oVar.l("gcm.n.visibility");
                        if (l10 != null) {
                        }
                        l10 = null;
                        if (l10 != null) {
                        }
                        l11 = oVar.l("gcm.n.notification_count");
                        if (l11 != null) {
                        }
                        l11 = null;
                        if (l11 != null) {
                        }
                        q10 = oVar.q();
                        if (q10 != null) {
                        }
                        t10 = oVar.t();
                        if (t10 != null) {
                        }
                        n10 = oVar.n();
                        if (n10 != null) {
                        }
                        boolean k2222222 = oVar.k("gcm.n.default_sound");
                        boolean z11222222 = k2222222;
                        if (oVar.k("gcm.n.default_vibrate_timings")) {
                        }
                        if (oVar.k("gcm.n.default_light_settings")) {
                        }
                        Notification notification3222222 = xVar.f33552s;
                        notification3222222.defaults = r02;
                        if ((r02 & c10) != 0) {
                        }
                        s15 = oVar.s("gcm.n.tag");
                        if (TextUtils.isEmpty(s15)) {
                        }
                        String str2222222 = s15;
                        if (lVar != null) {
                        }
                        if (Log.isLoggable("FirebaseMessaging", 3)) {
                        }
                        ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str2222222, 0, xVar.a());
                        return true;
                    }
                    s17 = bundle2.getString("com.google.firebase.messaging.default_notification_channel_id");
                    if (!TextUtils.isEmpty(s17)) {
                        notificationChannel2 = notificationManager.getNotificationChannel(s17);
                        if (notificationChannel2 == null) {
                            Log.w("FirebaseMessaging", "Notification Channel set in AndroidManifest.xml has not been created by the app. Default value will be used.");
                        }
                        packageName = context.getPackageName();
                        Resources resources2 = context.getResources();
                        packageManager = context.getPackageManager();
                        b2.x xVar2 = new b2.x(context, s17);
                        r10 = oVar.r(resources2, packageName, "gcm.n.title");
                        if (!TextUtils.isEmpty(r10)) {
                        }
                        r11 = oVar.r(resources2, packageName, "gcm.n.body");
                        if (!TextUtils.isEmpty(r11)) {
                        }
                        s10 = oVar.s("gcm.n.icon");
                        if (!TextUtils.isEmpty(s10)) {
                        }
                        i10 = bundle2.getInt("com.google.firebase.messaging.default_notification_icon", 0);
                        if (i10 != 0) {
                        }
                        i10 = packageManager.getApplicationInfo(packageName, 0).icon;
                        if (i10 == 0) {
                        }
                        xVar2.f33552s.icon = i11;
                        s11 = oVar.s("gcm.n.sound2");
                        if (TextUtils.isEmpty(s11)) {
                        }
                        if (!TextUtils.isEmpty(s11)) {
                        }
                        if (defaultUri != null) {
                        }
                        s12 = oVar.s("gcm.n.click_action");
                        if (TextUtils.isEmpty(s12)) {
                        }
                        AtomicInteger atomicInteger222 = yf.e.f68337a;
                        if (launchIntentForPackage != null) {
                        }
                        xVar2.f33541g = activity;
                        if (oVar.k("google.c.a.e")) {
                        }
                        if (broadcast != null) {
                        }
                        s13 = oVar.s("gcm.n.color");
                        if (!TextUtils.isEmpty(s13)) {
                        }
                        i12 = bundle2.getInt("com.google.firebase.messaging.default_notification_color", 0);
                        if (i12 != 0) {
                        }
                        valueOf = null;
                        if (valueOf != null) {
                        }
                        xVar2.c(!oVar.k("gcm.n.sticky"));
                        xVar2.f33546m = oVar.k("gcm.n.local_only");
                        s14 = oVar.s("gcm.n.ticker");
                        if (s14 != null) {
                        }
                        l = oVar.l("gcm.n.notification_priority");
                        if (l != null) {
                        }
                        l = null;
                        if (l != null) {
                        }
                        l10 = oVar.l("gcm.n.visibility");
                        if (l10 != null) {
                        }
                        l10 = null;
                        if (l10 != null) {
                        }
                        l11 = oVar.l("gcm.n.notification_count");
                        if (l11 != null) {
                        }
                        l11 = null;
                        if (l11 != null) {
                        }
                        q10 = oVar.q();
                        if (q10 != null) {
                        }
                        t10 = oVar.t();
                        if (t10 != null) {
                        }
                        n10 = oVar.n();
                        if (n10 != null) {
                        }
                        boolean k22222222 = oVar.k("gcm.n.default_sound");
                        boolean z112222222 = k22222222;
                        if (oVar.k("gcm.n.default_vibrate_timings")) {
                        }
                        if (oVar.k("gcm.n.default_light_settings")) {
                        }
                        Notification notification32222222 = xVar2.f33552s;
                        notification32222222.defaults = r02;
                        if ((r02 & c10) != 0) {
                        }
                        s15 = oVar.s("gcm.n.tag");
                        if (TextUtils.isEmpty(s15)) {
                        }
                        String str22222222 = s15;
                        if (lVar != null) {
                        }
                        if (Log.isLoggable("FirebaseMessaging", 3)) {
                        }
                        ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str22222222, 0, xVar2.a());
                        return true;
                    }
                    Log.w("FirebaseMessaging", "Missing Default Notification Channel metadata in AndroidManifest. Default value will be used.");
                    notificationChannel = notificationManager.getNotificationChannel("fcm_fallback_notification_channel");
                    if (notificationChannel == null) {
                        int identifier = context.getResources().getIdentifier("fcm_fallback_notification_channel_label", "string", context.getPackageName());
                        if (identifier == 0) {
                            Log.e("FirebaseMessaging", "String resource \"fcm_fallback_notification_channel_label\" is not found. Using default string channel name.");
                            string = "Misc";
                        } else {
                            string = context.getString(identifier);
                        }
                        notificationManager.createNotificationChannel(y1.p.a(string));
                    }
                    s17 = "fcm_fallback_notification_channel";
                    packageName = context.getPackageName();
                    Resources resources22 = context.getResources();
                    packageManager = context.getPackageManager();
                    b2.x xVar22 = new b2.x(context, s17);
                    r10 = oVar.r(resources22, packageName, "gcm.n.title");
                    if (!TextUtils.isEmpty(r10)) {
                    }
                    r11 = oVar.r(resources22, packageName, "gcm.n.body");
                    if (!TextUtils.isEmpty(r11)) {
                    }
                    s10 = oVar.s("gcm.n.icon");
                    if (!TextUtils.isEmpty(s10)) {
                    }
                    i10 = bundle2.getInt("com.google.firebase.messaging.default_notification_icon", 0);
                    if (i10 != 0) {
                    }
                    i10 = packageManager.getApplicationInfo(packageName, 0).icon;
                    if (i10 == 0) {
                    }
                    xVar22.f33552s.icon = i11;
                    s11 = oVar.s("gcm.n.sound2");
                    if (TextUtils.isEmpty(s11)) {
                    }
                    if (!TextUtils.isEmpty(s11)) {
                    }
                    if (defaultUri != null) {
                    }
                    s12 = oVar.s("gcm.n.click_action");
                    if (TextUtils.isEmpty(s12)) {
                    }
                    AtomicInteger atomicInteger2222 = yf.e.f68337a;
                    if (launchIntentForPackage != null) {
                    }
                    xVar22.f33541g = activity;
                    if (oVar.k("google.c.a.e")) {
                    }
                    if (broadcast != null) {
                    }
                    s13 = oVar.s("gcm.n.color");
                    if (!TextUtils.isEmpty(s13)) {
                    }
                    i12 = bundle2.getInt("com.google.firebase.messaging.default_notification_color", 0);
                    if (i12 != 0) {
                    }
                    valueOf = null;
                    if (valueOf != null) {
                    }
                    xVar22.c(!oVar.k("gcm.n.sticky"));
                    xVar22.f33546m = oVar.k("gcm.n.local_only");
                    s14 = oVar.s("gcm.n.ticker");
                    if (s14 != null) {
                    }
                    l = oVar.l("gcm.n.notification_priority");
                    if (l != null) {
                    }
                    l = null;
                    if (l != null) {
                    }
                    l10 = oVar.l("gcm.n.visibility");
                    if (l10 != null) {
                    }
                    l10 = null;
                    if (l10 != null) {
                    }
                    l11 = oVar.l("gcm.n.notification_count");
                    if (l11 != null) {
                    }
                    l11 = null;
                    if (l11 != null) {
                    }
                    q10 = oVar.q();
                    if (q10 != null) {
                    }
                    t10 = oVar.t();
                    if (t10 != null) {
                    }
                    n10 = oVar.n();
                    if (n10 != null) {
                    }
                    boolean k222222222 = oVar.k("gcm.n.default_sound");
                    boolean z1122222222 = k222222222;
                    if (oVar.k("gcm.n.default_vibrate_timings")) {
                    }
                    if (oVar.k("gcm.n.default_light_settings")) {
                    }
                    Notification notification322222222 = xVar22.f33552s;
                    notification322222222.defaults = r02;
                    if ((r02 & c10) != 0) {
                    }
                    s15 = oVar.s("gcm.n.tag");
                    if (TextUtils.isEmpty(s15)) {
                    }
                    String str222222222 = s15;
                    if (lVar != null) {
                    }
                    if (Log.isLoggable("FirebaseMessaging", 3)) {
                    }
                    ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str222222222, 0, xVar22.a());
                    return true;
                }
            }
            s17 = null;
            packageName = context.getPackageName();
            Resources resources222 = context.getResources();
            packageManager = context.getPackageManager();
            b2.x xVar222 = new b2.x(context, s17);
            r10 = oVar.r(resources222, packageName, "gcm.n.title");
            if (!TextUtils.isEmpty(r10)) {
            }
            r11 = oVar.r(resources222, packageName, "gcm.n.body");
            if (!TextUtils.isEmpty(r11)) {
            }
            s10 = oVar.s("gcm.n.icon");
            if (!TextUtils.isEmpty(s10)) {
            }
            i10 = bundle2.getInt("com.google.firebase.messaging.default_notification_icon", 0);
            if (i10 != 0) {
            }
            i10 = packageManager.getApplicationInfo(packageName, 0).icon;
            if (i10 == 0) {
            }
            xVar222.f33552s.icon = i11;
            s11 = oVar.s("gcm.n.sound2");
            if (TextUtils.isEmpty(s11)) {
            }
            if (!TextUtils.isEmpty(s11)) {
            }
            if (defaultUri != null) {
            }
            s12 = oVar.s("gcm.n.click_action");
            if (TextUtils.isEmpty(s12)) {
            }
            AtomicInteger atomicInteger22222 = yf.e.f68337a;
            if (launchIntentForPackage != null) {
            }
            xVar222.f33541g = activity;
            if (oVar.k("google.c.a.e")) {
            }
            if (broadcast != null) {
            }
            s13 = oVar.s("gcm.n.color");
            if (!TextUtils.isEmpty(s13)) {
            }
            i12 = bundle2.getInt("com.google.firebase.messaging.default_notification_color", 0);
            if (i12 != 0) {
            }
            valueOf = null;
            if (valueOf != null) {
            }
            xVar222.c(!oVar.k("gcm.n.sticky"));
            xVar222.f33546m = oVar.k("gcm.n.local_only");
            s14 = oVar.s("gcm.n.ticker");
            if (s14 != null) {
            }
            l = oVar.l("gcm.n.notification_priority");
            if (l != null) {
            }
            l = null;
            if (l != null) {
            }
            l10 = oVar.l("gcm.n.visibility");
            if (l10 != null) {
            }
            l10 = null;
            if (l10 != null) {
            }
            l11 = oVar.l("gcm.n.notification_count");
            if (l11 != null) {
            }
            l11 = null;
            if (l11 != null) {
            }
            q10 = oVar.q();
            if (q10 != null) {
            }
            t10 = oVar.t();
            if (t10 != null) {
            }
            n10 = oVar.n();
            if (n10 != null) {
            }
            boolean k2222222222 = oVar.k("gcm.n.default_sound");
            boolean z11222222222 = k2222222222;
            if (oVar.k("gcm.n.default_vibrate_timings")) {
            }
            if (oVar.k("gcm.n.default_light_settings")) {
            }
            Notification notification3222222222 = xVar222.f33552s;
            notification3222222222.defaults = r02;
            if ((r02 & c10) != 0) {
            }
            s15 = oVar.s("gcm.n.tag");
            if (TextUtils.isEmpty(s15)) {
            }
            String str2222222222 = s15;
            if (lVar != null) {
            }
            if (Log.isLoggable("FirebaseMessaging", 3)) {
            }
            ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str2222222222, 0, xVar222.a());
            return true;
        }
        lVar = null;
        if (lVar != null) {
        }
        context = (Context) this.f47087b;
        oVar = (oe.o) this.f47088c;
        AtomicInteger atomicInteger3 = yf.e.f68337a;
        applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128);
        if (applicationInfo != null) {
        }
        bundle = Bundle.EMPTY;
        Bundle bundle22 = bundle;
        String s172 = oVar.s("gcm.n.android_channel_id");
        if (Build.VERSION.SDK_INT >= 26) {
        }
        s172 = null;
        packageName = context.getPackageName();
        Resources resources2222 = context.getResources();
        packageManager = context.getPackageManager();
        b2.x xVar2222 = new b2.x(context, s172);
        r10 = oVar.r(resources2222, packageName, "gcm.n.title");
        if (!TextUtils.isEmpty(r10)) {
        }
        r11 = oVar.r(resources2222, packageName, "gcm.n.body");
        if (!TextUtils.isEmpty(r11)) {
        }
        s10 = oVar.s("gcm.n.icon");
        if (!TextUtils.isEmpty(s10)) {
        }
        i10 = bundle22.getInt("com.google.firebase.messaging.default_notification_icon", 0);
        if (i10 != 0) {
        }
        i10 = packageManager.getApplicationInfo(packageName, 0).icon;
        if (i10 == 0) {
        }
        xVar2222.f33552s.icon = i11;
        s11 = oVar.s("gcm.n.sound2");
        if (TextUtils.isEmpty(s11)) {
        }
        if (!TextUtils.isEmpty(s11)) {
        }
        if (defaultUri != null) {
        }
        s12 = oVar.s("gcm.n.click_action");
        if (TextUtils.isEmpty(s12)) {
        }
        AtomicInteger atomicInteger222222 = yf.e.f68337a;
        if (launchIntentForPackage != null) {
        }
        xVar2222.f33541g = activity;
        if (oVar.k("google.c.a.e")) {
        }
        if (broadcast != null) {
        }
        s13 = oVar.s("gcm.n.color");
        if (!TextUtils.isEmpty(s13)) {
        }
        i12 = bundle22.getInt("com.google.firebase.messaging.default_notification_color", 0);
        if (i12 != 0) {
        }
        valueOf = null;
        if (valueOf != null) {
        }
        xVar2222.c(!oVar.k("gcm.n.sticky"));
        xVar2222.f33546m = oVar.k("gcm.n.local_only");
        s14 = oVar.s("gcm.n.ticker");
        if (s14 != null) {
        }
        l = oVar.l("gcm.n.notification_priority");
        if (l != null) {
        }
        l = null;
        if (l != null) {
        }
        l10 = oVar.l("gcm.n.visibility");
        if (l10 != null) {
        }
        l10 = null;
        if (l10 != null) {
        }
        l11 = oVar.l("gcm.n.notification_count");
        if (l11 != null) {
        }
        l11 = null;
        if (l11 != null) {
        }
        q10 = oVar.q();
        if (q10 != null) {
        }
        t10 = oVar.t();
        if (t10 != null) {
        }
        n10 = oVar.n();
        if (n10 != null) {
        }
        boolean k22222222222 = oVar.k("gcm.n.default_sound");
        boolean z112222222222 = k22222222222;
        if (oVar.k("gcm.n.default_vibrate_timings")) {
        }
        if (oVar.k("gcm.n.default_light_settings")) {
        }
        Notification notification32222222222 = xVar2222.f33552s;
        notification32222222222.defaults = r02;
        if ((r02 & c10) != 0) {
        }
        s15 = oVar.s("gcm.n.tag");
        if (TextUtils.isEmpty(s15)) {
        }
        String str22222222222 = s15;
        if (lVar != null) {
        }
        if (Log.isLoggable("FirebaseMessaging", 3)) {
        }
        ((NotificationManager) ((Context) this.f47087b).getSystemService("notification")).notify(str22222222222, 0, xVar2222.a());
        return true;
    }

    public void n(ExecutorC5222e executorC5222e, final Map map, Cursor cursor, final InterfaceC5226i interfaceC5226i) {
        final byte[] blob = cursor.getBlob(0);
        final int i10 = cursor.getInt(1);
        final int i11 = cursor.getInt(2);
        Executor executor = executorC5222e;
        if (cursor.isLast()) {
            executor = AbstractC5224g.f58075b;
        }
        executor.execute(new Runnable() {
            @Override
            public final void run() {
                C3494a c3494a = C3494a.this;
                byte[] bArr = blob;
                int i12 = i10;
                int i13 = i11;
                InterfaceC5226i interfaceC5226i2 = interfaceC5226i;
                Map map2 = map;
                c3494a.getClass();
                try {
                    kf.l y10 = ((hf.t) c3494a.f47087b).y(mf.c.l(bArr));
                    y10.f54097d = new kf.p(new be.o(i12, i13));
                    if (interfaceC5226i2 == null || ((Boolean) interfaceC5226i2.mo0apply(y10)).booleanValue()) {
                        synchronized (map2) {
                            map2.put(y10.f54094a, y10);
                        }
                    }
                } catch (InvalidProtocolBufferException e4) {
                    dc.o.D("MaybeDocument failed to parse: %s", e4);
                    throw null;
                }
            }
        });
    }

    @Override
    public String nextKey() {
        String str = (String) this.f47088c;
        kotlin.jvm.internal.l.e(str);
        g();
        return str;
    }

    public void o(ArrayList arrayList) {
        if (arrayList.isEmpty()) {
            return;
        }
        ArrayList arrayList2 = new ArrayList();
        Ie.d dVar = kf.g.f54084a;
        Iterator it = arrayList.iterator();
        while (it.hasNext()) {
            h hVar = (h) it.next();
            arrayList2.add(da.t.N(hVar.f54087a));
            dVar = dVar.k(hVar, l.f(hVar, kf.p.f54103b));
        }
        List emptyList = Collections.emptyList();
        Iterator it2 = arrayList2.iterator();
        while (it2.hasNext()) {
            ArrayList arrayList3 = new ArrayList(emptyList);
            for (int i10 = 0; it2.hasNext() && i10 < 900 - emptyList.size(); i10++) {
                arrayList3.add(it2.next());
            }
            Object[] array = arrayList3.toArray();
            ((x) this.f47086a).b("DELETE FROM remote_documents WHERE path IN (" + ((Object) AbstractC5230m.g("?", ", ", array.length)) + ")", array);
        }
        ((r) this.f47088c).p(dVar);
    }

    public void p(r rVar) {
        this.f47088c = rVar;
    }

    @Override
    public boolean release(Object obj) {
        if (obj instanceof InterfaceC3662b) {
            ((InterfaceC3662b) obj).b().f48041a = true;
        }
        ((InterfaceC3663c) this.f47087b).m(obj);
        return ((InterfaceC5493d) this.f47088c).release(obj);
    }

    public C3494a(C6043d c6043d, C1207q0 c1207q0) {
        this.f47086a = c6043d;
        this.f47087b = c1207q0;
        this.f47088c = new ConcurrentHashMap();
    }

    public C3494a(Aj.f _koin) {
        kotlin.jvm.internal.l.h(_koin, "_koin");
        this.f47086a = _koin;
        this.f47088c = new ConcurrentHashMap();
        this.f47087b = new HashMap();
    }

    public C3494a(C5120t c5120t) {
        this.f47086a = c5120t;
        this.f47087b = new C2260u(1);
        V.t tVar = new V.t();
        tVar.f24228a = G.f24165a;
        tVar.f24229b = AbstractC1398l.f24201a;
        tVar.f24230c = W.a.f25466c;
        tVar.d(G.g(10));
        this.f47088c = tVar;
    }

    public C3494a() {
        this.f47086a = new Object();
    }

    public C3494a(Context context, oe.o oVar, ExecutorService executorService) {
        this.f47086a = executorService;
        this.f47087b = context;
        this.f47088c = oVar;
    }

    public C3494a(x xVar, t tVar) {
        this.f47086a = xVar;
        this.f47087b = tVar;
    }

    public C3494a(InterfaceC0454d0 interfaceC0454d0, InterfaceC0454d0 interfaceC0454d02, InterfaceC0454d0 interfaceC0454d03) {
        this.f47086a = interfaceC0454d0;
        this.f47087b = interfaceC0454d02;
        this.f47088c = interfaceC0454d03;
    }

    public C3494a(C5494e c5494e, InterfaceC3661a interfaceC3661a, InterfaceC3663c interfaceC3663c) {
        this.f47088c = c5494e;
        this.f47086a = interfaceC3661a;
        this.f47087b = interfaceC3663c;
    }
}