package com.ss.android.ugc.aweme.compliance.protection.jsb;

import X.0CB;
import X.0CH;
import X.6Is;
import X.AnonymousClass40F;
import X.AnonymousClass40W;
import X.AnonymousClass4UQ;
import X.C45693zt;
import X.C45713zv;
import X.KT7;
import X.M12;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.bullet.bridge.BaseBridgeMethod;
import com.ss.android.ugc.aweme.compliance.api.a;
import com.ss.android.ugc.aweme.compliance.protection.familypairing.FamilyPiaringManager;
import org.json.JSONObject;

public final class GetDigitalWellbeingStatusMethod extends BaseBridgeMethod implements 6Is {
    public final String LIZIZ;

    static {
        Covode.recordClassIndex(62103);
    }

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

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

    public /* synthetic */ GetDigitalWellbeingStatusMethod(KT7 kt7) {
        this(kt7, "getDigitalWellbeingStatus");
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public GetDigitalWellbeingStatusMethod(KT7 kt7, String str) {
        super(kt7);
        M12.LIZ(kt7, str);
        this.LIZIZ = str;
    }

    public final void LIZ(JSONObject jSONObject, AnonymousClass4UQ r8) {
        int i;
        int i2;
        int i3;
        int i4;
        int i5;
        M12.LIZ(jSONObject, r8);
        try {
            JSONObject jSONObject2 = new JSONObject();
            M12.LIZ(jSONObject2);
            int i6 = 1;
            int i7 = 0;
            if (AnonymousClass40F.LIZIZ.LIZ()) {
                i = 1;
            } else {
                i = 0;
            }
            jSONObject2.put("self_timelock", i);
            if (AnonymousClass40F.LIZIZ.LIZIZ()) {
                i2 = 1;
            } else {
                i2 = 0;
            }
            jSONObject2.put("self_restricted_mode", i2);
            C45713zv r0 = C45693zt.LIZ;
            if (r0 == null || !r0.isWeeklyUpdate()) {
                i3 = 0;
            } else {
                i3 = 1;
            }
            jSONObject2.put("self_weekly_update", i3);
            jSONObject2.put("max_use_duration_in_minutes", AnonymousClass40F.LIZIZ.LIZJ());
            if (a.LJIILL().LIZ() == AnonymousClass40W.UNLINK_LOCKED) {
                i4 = 4;
            } else {
                i4 = 0;
            }
            jSONObject2.put("family_role", i4);
            if (FamilyPiaringManager.LIZIZ.LIZJ()) {
                i5 = 1;
            } else {
                i5 = 0;
            }
            jSONObject2.put("family_restricted_mode", i5);
            if (!FamilyPiaringManager.LIZIZ.LIZJ()) {
                i6 = 0;
            }
            jSONObject2.put("family_timelock", i6);
            jSONObject2.put("session_duration_reminder", C45693zt.LIZLLL.LIZJ());
            C45713zv r02 = C45693zt.LIZ;
            if (r02 != null) {
                i7 = r02.getScreenTimeType();
            }
            jSONObject2.put("session_duration_type", i7);
            r8.LIZ((Object) jSONObject2);
        } catch (Exception e) {
            r8.LIZ(-1, e.getMessage());
        }
    }
}
