All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yy.httpproxy.util.SystemProperty Maven / Gradle / Ivy

There is a newer version: 1.1.28
Show newest version
package com.yy.httpproxy.util;

import android.content.Context;
import java.lang.reflect.Method;

public class SystemProperty {

    private Context mContext;

    public SystemProperty(Context mContext) {
        this.mContext = mContext;
    }

    public String get(String key) {
        try {
            ClassLoader classLoader = mContext.getClassLoader();
            Class SystemProperties = classLoader.loadClass("android.os.SystemProperties");
            Method methodGet = SystemProperties.getMethod("get", String.class);
            return (String) methodGet.invoke(SystemProperties, key);
        } catch (Exception e) {
            return null;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy