大漢易經書院.apk(点击下载) / l.java


package com.lt.app.a;

import android.net.Uri;
import android.text.TextUtils;
import com.google.gson.Gson;
import java.lang.reflect.Field;

/* compiled from: LTOptions */
public class l {
    public int fullScreen = -1;
    public int refresh = -1;
    public int screenOrientation = -1;
    public int showTitle = -1;
    public int statusBarBlackText = -1;
    public String statusBarColor = null;
    public String titleColor = null;
    public String titleText = null;
    public String titleTextColor = null;
    public String url = null;

    /* renamed from: ʻ  reason: contains not printable characters */
    public String m8370() {
        return new Gson().toJson(this);
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    public static l m8368(String str) {
        l lVar = null;
        if (!TextUtils.isEmpty(str) && str.contains("xapp-")) {
            Uri parse = Uri.parse(str);
            Field[] fields = l.class.getFields();
            for (Field field : fields) {
                String queryParameter = parse.getQueryParameter("xapp-" + field.getName());
                if (!TextUtils.isEmpty(queryParameter)) {
                    if (lVar == null) {
                        lVar = new l();
                    }
                    try {
                        if (field.getType() == String.class) {
                            field.set(lVar, queryParameter);
                        } else if (field.getType() == Integer.TYPE) {
                            field.setInt(lVar, "true".equals(queryParameter) ? 1 : "false".equals(queryParameter) ? 0 : Integer.parseInt(queryParameter));
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        }
        return lVar;
    }

    /* renamed from: ʼ  reason: contains not printable characters */
    public static l m8369(String str) {
        return (l) new Gson().fromJson(str, l.class);
    }
}