package com.ss.android.ugc.aweme.bullet.bridge.common;

import X.0CB;
import X.0CH;
import X.3jJ;
import X.4UQ;
import X.6Is;
import X.C0302Jyr;
import X.C0303Jys;
import X.KT7;
import X.M12;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.bullet.bridge.BaseBridgeMethod;
import java.lang.ref.WeakReference;
import org.json.JSONObject;

public final class FileSelectionMethod extends BaseBridgeMethod implements 6Is {
    public static final C0302Jyr LIZIZ = new C0302Jyr((byte) 0);
    public final String LIZJ = "fileSelection";

    static {
        Covode.recordClassIndex(54997);
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final String LIZLLL() {
        return this.LIZJ;
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public FileSelectionMethod(KT7 kt7) {
        super(kt7);
        M12.LIZ((Object) kt7);
    }

    public final void LIZ(JSONObject jSONObject, 4UQ r5) {
        M12.LIZ((Object) jSONObject, (Object) r5);
        Context LJ = LJ();
        while (LJ != null) {
            Activity LIZ = 3jJ.LIZ(LJ);
            if (LIZ != null) {
                new C0303Jys(LIZ, r5, new WeakReference(LIZ)).LIZ(jSONObject);
                return;
            } else if (LJ instanceof ContextWrapper) {
                LJ = ((ContextWrapper) LJ).getBaseContext();
            } else {
                return;
            }
        }
    }
}
