反射获得SystemProperties

try {
Class systemPropertiesClass = Class.forName("android.os.SystemProperties");
Method m = systemPropertiesClass.getMethod("get", String.class);
String dream = (String) m.invoke(systemPropertiesClass, "com.xxx.xxx.xxx");
LogUtil.i("===getDreamValue dream " + dream);
return dream;
} catch (Exception e) {
}
posted @ 2021-12-02 09:43  梦道子  阅读(73)  评论(0编辑  收藏  举报