android系统属性设置(通过代码设置和手动设置)

来源:互联网 发布:keba控制器编程手册 编辑:程序博客网 时间:2024/05/21 21:09

编译后的android系统属性build.prop,所在位置:out\target\product\kylin\system\build.prop。

在代码中进行设置,可以通过frameworks/base/core/java/android/os/SystemProperties.java的接口定义来进行:

    private static native String native_get(String key);
    private static native String native_get(String key, String def);
    private static native int native_get_int(String key, int def);
    private static native long native_get_long(String key, long def);
    private static native boolean native_get_boolean(String key, boolean def);
    private static native void native_set(String key, String def);

在编译前进行手动设置,可以在build\tools\buildinfo.sh里面进行修改。


原创粉丝点击