导航菜单

页面标题

页面副标题

CityMall v1.42.1 - x.java 源代码

正在查看: CityMall v1.42.1 应用的 x.java JAVA 源代码文件

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


package com.swmansion.rnscreens;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.uimanager.events.Event;
import com.facebook.react.uimanager.events.EventDispatcher;
import com.facebook.react.uimanager.t0;
import in.juspay.hypersdk.core.PaymentConstants;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.enums.EnumEntries;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.SourceDebugExtension;
import y6.C0513b;

@Metadata
@SourceDebugExtension
public class x extends Fragment implements ScreenFragmentWrapper {
    public static final a h = new a(null);
    public C0208s a;
    private final List b;
    private boolean c;
    private float d;
    private boolean e;
    private boolean f;
    private boolean g;

    public static final class a {
        public a(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public final short a(float f) {
            return (short) (f == 0.0f ? 1 : f == 1.0f ? 2 : 3);
        }

        private a() {
        }
    }

    public static final class b {
        public static final b a = new b("DID_APPEAR", 0);
        public static final b b = new b("WILL_APPEAR", 1);
        public static final b c = new b("DID_DISAPPEAR", 2);
        public static final b d = new b("WILL_DISAPPEAR", 3);
        private static final b[] e;
        private static final EnumEntries f;

        static {
            b[] a2 = a();
            e = a2;
            f = Q6.a.a(a2);
        }

        private b(String str, int i) {
        }

        private static final b[] a() {
            return new b[]{a, b, c, d};
        }

        public static b valueOf(String str) {
            return (b) Enum.valueOf(b.class, str);
        }

        public static b[] values() {
            return (b[]) e.clone();
        }
    }

    private static final class c extends FrameLayout {
        public c(Context context) {
            super(context);
            kotlin.jvm.internal.j.i(context, "context");
        }

        @Override
        public void clearFocus() {
            if (getVisibility() != 4) {
                super.clearFocus();
            }
        }
    }

    public class d {
        public static final int[] a;

        static {
            int[] iArr = new int[b.values().length];
            try {
                iArr[b.b.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[b.a.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[b.d.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                iArr[b.c.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            a = iArr;
        }
    }

    public x() {
        this.b = new ArrayList();
        this.d = -1.0f;
        this.e = true;
        this.f = true;
        throw new IllegalStateException("Screen fragments should never be restored. Follow instructions from https://github.com/software-mansion/react-native-screens/issues/17#issuecomment-424704067 to properly configure your main activity.");
    }

    private final void B() {
        A(b.a, this);
        F(1.0f, false);
    }

    private final void C() {
        A(b.c, this);
        F(1.0f, true);
    }

    private final void D() {
        A(b.b, this);
        F(0.0f, false);
    }

    private final void E() {
        A(b.d, this);
        F(0.0f, true);
    }

    private final void G(final boolean z) {
        this.g = !z;
        Fragment parentFragment = getParentFragment();
        if (parentFragment == null || ((parentFragment instanceof x) && !((x) parentFragment).g)) {
            if (isResumed()) {
                UiThreadUtil.runOnUiThread(new Runnable() {
                    @Override
                    public final void run() {
                        x.H(z, this);
                    }
                });
            } else if (z) {
                C();
            } else {
                E();
            }
        }
    }

    public static final void H(boolean z, x this$0) {
        kotlin.jvm.internal.j.i(this$0, "this$0");
        if (z) {
            this$0.B();
        } else {
            this$0.D();
        }
    }

    private final void L() {
        Activity activity = getActivity();
        if (activity == null) {
            this.c = true;
        } else {
            M.a.x(d(), activity, n());
        }
    }

    public void A(b event, ScreenFragmentWrapper fragmentWrapper) {
        Event kVar;
        kotlin.jvm.internal.j.i(event, "event");
        kotlin.jvm.internal.j.i(fragmentWrapper, "fragmentWrapper");
        Fragment b2 = fragmentWrapper.b();
        if (b2 instanceof E) {
            E e = (E) b2;
            if (e.y(event)) {
                C0208s d2 = e.d();
                fragmentWrapper.l(event);
                int f = t0.f(d2);
                int i = d.a[event.ordinal()];
                if (i == 1) {
                    kVar = new y6.k(f, d2.getId());
                } else if (i == 2) {
                    kVar = new y6.f(f, d2.getId());
                } else if (i == 3) {
                    kVar = new y6.l(f, d2.getId());
                } else {
                    if (i != 4) {
                        throw new K6.m();
                    }
                    kVar = new y6.g(f, d2.getId());
                }
                ReactContext context = d().getContext();
                kotlin.jvm.internal.j.g(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
                EventDispatcher c2 = t0.c(context, d().getId());
                if (c2 != null) {
                    c2.h(kVar);
                }
                fragmentWrapper.g(event);
            }
        }
    }

    public void F(float f, boolean z) {
        if (!(this instanceof E) || this.d == f) {
            return;
        }
        float max = Math.max(0.0f, Math.min(1.0f, f));
        this.d = max;
        short a2 = h.a(max);
        C0210u container = d().getContainer();
        boolean goingForward = container instanceof z ? ((z) container).getGoingForward() : false;
        ReactContext context = d().getContext();
        kotlin.jvm.internal.j.g(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
        ReactContext reactContext = context;
        EventDispatcher c2 = t0.c(reactContext, d().getId());
        if (c2 != null) {
            c2.h(new y6.j(t0.e(reactContext), d().getId(), this.d, z, goingForward, a2));
        }
    }

    public void I() {
        G(true);
    }

    public void J() {
        G(false);
    }

    public void K(C0208s c0208s) {
        kotlin.jvm.internal.j.i(c0208s, "<set-?>");
        this.a = c0208s;
    }

    @Override
    public Fragment b() {
        return this;
    }

    @Override
    public C0208s d() {
        C0208s c0208s = this.a;
        if (c0208s != null) {
            return c0208s;
        }
        kotlin.jvm.internal.j.A(PaymentConstants.Event.SCREEN);
        return null;
    }

    public boolean e() {
        return false;
    }

    @Override
    public Activity f() {
        Fragment fragment;
        FragmentActivity activity;
        FragmentActivity activity2 = getActivity();
        if (activity2 != null) {
            return activity2;
        }
        ReactContext context = d().getContext();
        if (context instanceof ReactContext) {
            ReactContext reactContext = context;
            if (reactContext.getCurrentActivity() != null) {
                return reactContext.getCurrentActivity();
            }
        }
        for (ViewParent container = d().getContainer(); container != null; container = container.getParent()) {
            if ((container instanceof C0208s) && (fragment = ((C0208s) container).getFragment()) != null && (activity = fragment.getActivity()) != null) {
                return activity;
            }
        }
        return null;
    }

    @Override
    public void g(b event) {
        ScreenFragmentWrapper fragmentWrapper;
        kotlin.jvm.internal.j.i(event, "event");
        List h2 = h();
        ArrayList arrayList = new ArrayList();
        for (Object obj : h2) {
            if (((C0210u) obj).getScreenCount() > 0) {
                arrayList.add(obj);
            }
        }
        Iterator it = arrayList.iterator();
        while (it.hasNext()) {
            C0208s topScreen = ((C0210u) it.next()).getTopScreen();
            if (topScreen != null && (fragmentWrapper = topScreen.getFragmentWrapper()) != null) {
                A(event, fragmentWrapper);
            }
        }
    }

    @Override
    public List h() {
        return this.b;
    }

    @Override
    public void i(C0210u container) {
        kotlin.jvm.internal.j.i(container, "container");
        h().add(container);
    }

    public void j() {
        L();
    }

    @Override
    public void k(C0210u container) {
        kotlin.jvm.internal.j.i(container, "container");
        h().remove(container);
    }

    @Override
    public void l(b event) {
        kotlin.jvm.internal.j.i(event, "event");
        int i = d.a[event.ordinal()];
        if (i == 1) {
            this.e = false;
            return;
        }
        if (i == 2) {
            this.f = false;
        } else if (i == 3) {
            this.e = true;
        } else {
            if (i != 4) {
                return;
            }
            this.f = true;
        }
    }

    @Override
    public ReactContext n() {
        if (getContext() instanceof ReactContext) {
            ReactContext context = getContext();
            kotlin.jvm.internal.j.g(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
            return context;
        }
        if (d().getContext() instanceof ReactContext) {
            ReactContext context2 = d().getContext();
            kotlin.jvm.internal.j.g(context2, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
            return context2;
        }
        for (ViewParent container = d().getContainer(); container != null; container = container.getParent()) {
            if (container instanceof C0208s) {
                C0208s c0208s = (C0208s) container;
                if (c0208s.getContext() instanceof ReactContext) {
                    ReactContext context3 = c0208s.getContext();
                    kotlin.jvm.internal.j.g(context3, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
                    return context3;
                }
            }
        }
        return null;
    }

    public View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle bundle) {
        kotlin.jvm.internal.j.i(inflater, "inflater");
        d().setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
        Context context = getContext();
        if (context == null) {
            return null;
        }
        c cVar = new c(context);
        cVar.addView(z6.c.b(d()));
        return cVar;
    }

    public void onDestroy() {
        super.onDestroy();
        C0210u container = d().getContainer();
        if (container == null || !container.n(d().getFragmentWrapper())) {
            ReactContext context = d().getContext();
            if (context instanceof ReactContext) {
                int e = t0.e(context);
                EventDispatcher c2 = t0.c(context, d().getId());
                if (c2 != null) {
                    c2.h(new y6.h(e, d().getId()));
                }
            }
        }
        h().clear();
    }

    public void onResume() {
        super.onResume();
        if (this.c) {
            this.c = false;
            M.a.x(d(), f(), n());
        }
    }

    public boolean y(b event) {
        kotlin.jvm.internal.j.i(event, "event");
        int i = d.a[event.ordinal()];
        if (i == 1) {
            return this.e;
        }
        if (i == 2) {
            return this.f;
        }
        if (i != 3) {
            if (i != 4) {
                throw new K6.m();
            }
            if (!this.f) {
                return true;
            }
        } else if (!this.e) {
            return true;
        }
        return false;
    }

    public void z() {
        ReactContext context = d().getContext();
        kotlin.jvm.internal.j.g(context, "null cannot be cast to non-null type com.facebook.react.bridge.ReactContext");
        ReactContext reactContext = context;
        int e = t0.e(reactContext);
        EventDispatcher c2 = t0.c(reactContext, d().getId());
        if (c2 != null) {
            c2.h(new C0513b(e, d().getId()));
        }
    }

    public x(C0208s screenView) {
        kotlin.jvm.internal.j.i(screenView, "screenView");
        this.b = new ArrayList();
        this.d = -1.0f;
        this.e = true;
        this.f = true;
        K(screenView);
    }
}