android的SystemProperties ro变量的使用

xiaoxiao2021-02-28  79

在device.mk添加 。路径以项目规范为主

ifeq ($(strip $(AAAAA)), yes)     PRODUCT_PROPERTY_OVERRIDES += ro.xxx=1 endif

就相当于添加了名为:ro.xxx变量

在项目的ProjectConfig.mk里添加

AAAAA=yes就可以达到控制变量的目的

在文件里引用先导入包 

import android.os.SystemProperties; 然后如下使用就可以了获得bool值

SystemProperties.getBoolean("ro.xxx", false)

转载请注明原文地址: https://www.6miu.com/read-96332.html

最新回复(0)