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

import X.0CB;
import X.0CH;
import X.4CM;
import X.4UQ;
import X.4sO;
import X.6Is;
import X.C0630KBh;
import X.KT7;
import X.M12;
import android.app.Activity;
import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.bullet.bridge.BaseBridgeMethod;
import kotlin.h.b.n;
import org.json.JSONObject;

public final class SetStatusBarMethod extends BaseBridgeMethod implements 6Is {
    public static final C0630KBh LIZIZ = new C0630KBh((byte) 0);
    public final String LIZJ = "setStatusBar";

    static {
        Covode.recordClassIndex(55135);
    }

    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 SetStatusBarMethod(KT7 kt7) {
        super(kt7);
        M12.LIZ((Object) kt7);
    }

    public final void LIZ(JSONObject jSONObject, 4UQ r11) {
        M12.LIZ((Object) jSONObject, (Object) r11);
        String optString = jSONObject.optString("style");
        boolean optBoolean = jSONObject.optBoolean("hidden", false);
        if (optString == null || optString.length() == 0 || ((!n.LIZ(optString, "dark")) && (!n.LIZ(optString, "light")))) {
            r11.LIZ(-1, "Style must be light or dark!");
            return;
        }
        Context context = (Context) this.LIZ.LIZJ(Context.class);
        if (context == null) {
            r11.LIZ(-2, "Missing activity context [1]");
            return;
        }
        Activity LIZ = 4sO.LIZ(context);
        if (LIZ == null) {
            r11.LIZ(-2, "Missing activity context [2]");
            return;
        }
        int hashCode = optString.hashCode();
        if (hashCode != 3075958) {
            if (hashCode == 102970646 && optString.equals("light")) {
                4CM.LIZ(LIZ, false);
            }
        } else if (optString.equals("dark")) {
            4CM.LIZ(LIZ, true);
        }
        if (optBoolean) {
            4CM.LIZ(LIZ);
        }
        r11.LIZ(new JSONObject());
    }
}
