package com.ss.android.ugc.aweme.fe.method;

import X.0CB;
import X.0CH;
import X.6Is;
import X.9EH;
import X.9Ge;
import X.9HQ;
import X.C3137JMq;
import X.FIu;
import X.KKi;
import android.content.ContentResolver;
import android.text.TextUtils;
import android.text.format.DateFormat;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.fe.base.BaseCommonJavaMethod;
import java.util.Map;
import org.json.JSONObject;

public final class AppInfoMethod extends BaseCommonJavaMethod implements 6Is {
    public static final 9HQ LIZ = new 9HQ((byte) 0);

    static {
        Covode.recordClassIndex(76038);
    }

    public AppInfoMethod(byte b) {
        this();
    }

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

    public /* synthetic */ AppInfoMethod() {
        this((KKi) null);
    }

    public AppInfoMethod(KKi kKi) {
        super(kKi);
    }

    public final void handle(JSONObject jSONObject, FIu fIu) {
        String str;
        String str2;
        JSONObject jSONObject2 = new JSONObject();
        if (jSONObject != null) {
            str = jSONObject.optString("permissionGroup");
        } else {
            str = null;
        }
        for (Map.Entry entry : C3137JMq.LIZ(str).entrySet()) {
            jSONObject2.put((String) entry.getKey(), entry.getValue());
        }
        ContentResolver contentResolver = 9EH.LJJIFFI.LIZ().getContentResolver();
        if (contentResolver != null) {
            if (TextUtils.equals("time_12_24", "android_id")) {
                if (TextUtils.isEmpty(9Ge.LIZ)) {
                    9Ge.LIZ = 9HQ.LIZ(contentResolver, "time_12_24");
                }
                str2 = 9Ge.LIZ;
            } else {
                str2 = 9HQ.LIZ(contentResolver, "time_12_24");
            }
        } else if (DateFormat.is24HourFormat(9EH.LJJIFFI.LIZ())) {
            str2 = "24";
        } else {
            str2 = "12";
        }
        jSONObject2.put("time_system", str2);
        jSONObject2.put("code", 1);
        if (fIu != null) {
            fIu.LIZ(jSONObject2);
        }
    }
}
