package o;

import android.content.Context;
import android.view.KeyEvent;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.Api;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.h3, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1352h3 extends AbstractC0706aK implements NC {
    public final /* synthetic */ int m;
    public final /* synthetic */ Object n;

    /* renamed from: o, reason: collision with root package name */
    public final /* synthetic */ Object f551o;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C1352h3(int i, Object obj, Object obj2) {
        super(0);
        this.m = i;
        this.n = obj;
        this.f551o = obj2;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r3v10 */
    /* JADX WARN: Type inference failed for: r3v11 */
    /* JADX WARN: Type inference failed for: r3v2 */
    /* JADX WARN: Type inference failed for: r3v3, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r3v31 */
    /* JADX WARN: Type inference failed for: r3v32 */
    /* JADX WARN: Type inference failed for: r3v5 */
    /* JADX WARN: Type inference failed for: r3v6, types: [o.LP] */
    /* JADX WARN: Type inference failed for: r3v7, types: [java.lang.Object] */
    /* JADX WARN: Type inference failed for: r3v8 */
    /* JADX WARN: Type inference failed for: r3v9 */
    /* JADX WARN: Type inference failed for: r4v12 */
    /* JADX WARN: Type inference failed for: r4v13 */
    /* JADX WARN: Type inference failed for: r4v14 */
    /* JADX WARN: Type inference failed for: r4v15, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r4v16 */
    /* JADX WARN: Type inference failed for: r4v17 */
    /* JADX WARN: Type inference failed for: r4v18, types: [o.iR] */
    /* JADX WARN: Type inference failed for: r4v35 */
    /* JADX WARN: Type inference failed for: r4v36 */
    /* JADX WARN: Type inference failed for: r4v37 */
    /* JADX WARN: Type inference failed for: r4v38 */
    @Override // o.NC
    public final Object a() {
        R50 r50;
        C2420sK c2420sK;
        T00 t00;
        switch (this.m) {
            case 0:
                return Boolean.valueOf(super/*android.view.ViewGroup*/.dispatchKeyEvent((KeyEvent) this.f551o));
            case 1:
                C2966y3 c2966y3 = (C2966y3) this.f551o;
                W40 w40 = (W40) this.n;
                O40 o40 = w40.p;
                O40 o402 = w40.q;
                Float f = w40.n;
                Float f2 = w40.f391o;
                float fFloatValue = (o40 == null || f == null) ? 0.0f : ((Number) o40.a.a()).floatValue() - f.floatValue();
                float fFloatValue2 = (o402 == null || f2 == null) ? 0.0f : ((Number) o402.a.a()).floatValue() - f2.floatValue();
                if (fFloatValue != 0.0f || fFloatValue2 != 0.0f) {
                    int iA = c2966y3.A(w40.l);
                    T50 t50 = (T50) c2966y3.t().b(c2966y3.n);
                    if (t50 != null) {
                        try {
                            H0 h0 = c2966y3.p;
                            if (h0 != null) {
                                h0.a.setBoundsInScreen(c2966y3.k(t50));
                            }
                        } catch (IllegalStateException unused) {
                        }
                    }
                    T50 t502 = (T50) c2966y3.t().b(c2966y3.f798o);
                    if (t502 != null) {
                        try {
                            H0 h02 = c2966y3.q;
                            if (h02 != null) {
                                h02.a.setBoundsInScreen(c2966y3.k(t502));
                            }
                        } catch (IllegalStateException unused2) {
                        }
                    }
                    c2966y3.d.invalidate();
                    T50 t503 = (T50) c2966y3.t().b(iA);
                    if (t503 != null && (r50 = t503.a) != null && (c2420sK = r50.c) != null) {
                        if (o40 != null) {
                            c2966y3.s.h(iA, o40);
                        }
                        if (o402 != null) {
                            c2966y3.t.h(iA, o402);
                        }
                        c2966y3.w(c2420sK);
                    }
                }
                if (o40 != null) {
                    w40.n = (Float) o40.a.a();
                }
                if (o402 != null) {
                    w40.f391o = (Float) o402.a.a();
                }
                return Oh0.a;
            case 2:
                NC nc = (NC) this.n;
                if (nc != null && (t00 = (T00) nc.a()) != null) {
                    return t00;
                }
                AbstractC2239qS abstractC2239qS = (AbstractC2239qS) this.f551o;
                if (!abstractC2239qS.P0().y) {
                    abstractC2239qS = null;
                }
                if (abstractC2239qS != null) {
                    return AbstractC2001nt0.f(0L, C1884mi0.O(abstractC2239qS.n));
                }
                return null;
            case 3:
                ((C0265Kf) this.n).B.g((C0291Lf) this.f551o);
                return Oh0.a;
            case 4:
                AbstractC0452Rl abstractC0452Rl = ((AbstractC0063Cl) this.n).a;
                C0037Bl c0037Bl = (C0037Bl) this.f551o;
                synchronized (abstractC0452Rl.c) {
                    if (abstractC0452Rl.d.remove(c0037Bl) && abstractC0452Rl.d.isEmpty()) {
                        abstractC0452Rl.d();
                    }
                }
                return Oh0.a;
            case 5:
                ((B10) this.n).l = ((C1556jA) this.f551o).I0();
                return Oh0.a;
            case 6:
                ((C0988dF) this.n).d((LP) this.f551o);
                return Oh0.a;
            case 7:
                C0312Mb c0312Mb = ((C2420sK) this.n).N;
                B10 b10 = (B10) this.f551o;
                if ((((LP) c0312Mb.g).f209o & 8) != 0) {
                    for (LP lp = (Bc0) c0312Mb.f; lp != null; lp = lp.p) {
                        if ((lp.n & 8) != 0) {
                            AbstractC0561Vq abstractC0561VqI = lp;
                            ?? c1479iR = 0;
                            while (abstractC0561VqI != 0) {
                                if (abstractC0561VqI instanceof P50) {
                                    P50 p50 = (P50) abstractC0561VqI;
                                    if (p50.b0()) {
                                        N50 n50 = new N50();
                                        b10.l = n50;
                                        n50.f250o = true;
                                    }
                                    if (p50.c0()) {
                                        ((N50) b10.l).n = true;
                                    }
                                    p50.d0((N50) b10.l);
                                } else if ((abstractC0561VqI.n & 8) != 0 && (abstractC0561VqI instanceof AbstractC0561Vq)) {
                                    LP lp2 = abstractC0561VqI.A;
                                    int i = 0;
                                    abstractC0561VqI = abstractC0561VqI;
                                    c1479iR = c1479iR;
                                    while (lp2 != null) {
                                        if ((lp2.n & 8) != 0) {
                                            i++;
                                            c1479iR = c1479iR;
                                            if (i == 1) {
                                                abstractC0561VqI = lp2;
                                            } else {
                                                if (c1479iR == 0) {
                                                    c1479iR = new C1479iR(new LP[16]);
                                                }
                                                if (abstractC0561VqI != 0) {
                                                    c1479iR.b(abstractC0561VqI);
                                                    abstractC0561VqI = 0;
                                                }
                                                c1479iR.b(lp2);
                                            }
                                        }
                                        lp2 = lp2.q;
                                        abstractC0561VqI = abstractC0561VqI;
                                        c1479iR = c1479iR;
                                    }
                                    if (i == 1) {
                                    }
                                }
                                abstractC0561VqI = AbstractC2539te.i(c1479iR);
                            }
                        }
                    }
                }
                return Oh0.a;
            case 8:
                C1091eN c1091eN = (C1091eN) this.n;
                C2800wK c2800wK = c1091eN.q;
                c2800wK.g = 0;
                C1479iR c1479iRW = c2800wK.a.w();
                Object[] objArr = c1479iRW.l;
                int i2 = c1479iRW.n;
                for (int i3 = 0; i3 < i2; i3++) {
                    C1091eN c1091eN2 = ((C2420sK) objArr[i3]).O.p;
                    c1091eN2.s = c1091eN2.t;
                    c1091eN2.t = Api.BaseClientBuilder.API_PRIORITY_OTHER;
                    if (c1091eN2.u == 2) {
                        c1091eN2.u = 3;
                    }
                }
                C2420sK c2420sK2 = c2800wK.a;
                C2420sK c2420sK3 = c2800wK.a;
                C1479iR c1479iRW2 = c2420sK2.w();
                Object[] objArr2 = c1479iRW2.l;
                int i4 = c1479iRW2.n;
                for (int i5 = 0; i5 < i4; i5++) {
                    ((C2420sK) objArr2[i5]).O.p.B.getClass();
                }
                C2607uH c2607uH = c1091eN.n().a0;
                if (c2607uH != null) {
                    boolean z = c2607uH.v;
                    SQ sq = (SQ) c2420sK3.m();
                    int i6 = ((C1479iR) sq.m).n;
                    for (int i7 = 0; i7 < i6; i7++) {
                        AbstractC0709aN abstractC0709aNN0 = ((AbstractC2239qS) ((C2420sK) sq.get(i7)).N.e).N0();
                        if (abstractC0709aNN0 != null) {
                            abstractC0709aNN0.v = z;
                        }
                    }
                }
                ((AbstractC0709aN) this.f551o).x0().b();
                if (c1091eN.n().a0 != null) {
                    SQ sq2 = (SQ) c2420sK3.m();
                    int i8 = ((C1479iR) sq2.m).n;
                    for (int i9 = 0; i9 < i8; i9++) {
                        AbstractC0709aN abstractC0709aNN02 = ((AbstractC2239qS) ((C2420sK) sq2.get(i9)).N.e).N0();
                        if (abstractC0709aNN02 != null) {
                            abstractC0709aNN02.v = false;
                        }
                    }
                }
                C1479iR c1479iRW3 = c2420sK3.w();
                Object[] objArr3 = c1479iRW3.l;
                int i10 = c1479iRW3.n;
                for (int i11 = 0; i11 < i10; i11++) {
                    C1091eN c1091eN3 = ((C2420sK) objArr3[i11]).O.p;
                    int i12 = c1091eN3.s;
                    int i13 = c1091eN3.t;
                    if (i12 != i13 && i13 == Integer.MAX_VALUE) {
                        c1091eN3.d0(true);
                    }
                }
                C1479iR c1479iRW4 = c2420sK3.w();
                Object[] objArr4 = c1479iRW4.l;
                int i14 = c1479iRW4.n;
                for (int i15 = 0; i15 < i14; i15++) {
                    C2515tK c2515tK = ((C2420sK) objArr4[i15]).O.p.B;
                    c2515tK.getClass();
                    c2515tK.c = false;
                }
                return Oh0.a;
            case ConnectionResult.SERVICE_INVALID /* 9 */:
                return As0.s((Context) this.n, ((C1675kY) this.f551o).a.concat(".preferences_pb"));
            case 10:
                G10 g10 = (G10) this.n;
                String str = (String) this.f551o;
                return AbstractC2539te.h(g10.l.matcher(str), 0, str);
            default:
                return ((Context) this.n).getSharedPreferences((String) this.f551o, 0);
        }
    }
}
