翰林优商.apk(点击下载) / bc.java


package com.kwad.sdk.utils;

import com.kwad.sdk.core.e.b;
import com.kwad.sdk.crash.utils.g;
import java.io.IOException;

public final class bc {
    private static Class<?> bCn;

    private static String fE(String str) {
        try {
            Runtime runtime = Runtime.getRuntime();
            return g.d(runtime.exec("getprop " + str).getInputStream());
        } catch (IOException e) {
            b.printStackTrace(e);
            return null;
        }
    }

    private static Object g(String str, Object... objArr) {
        try {
            if (bCn == null) {
                bCn = Class.forName("android.os.SystemProperties");
            }
            return r.c(bCn, str, objArr);
        } catch (Throwable th) {
            b.printStackTrace(th);
            return null;
        }
    }

    public static String get(String str) {
        Object g = g("get", str);
        return g instanceof String ? (String) g : fE(str);
    }
}