赞
踩
android Settings系统属性,共分三种:
1.global:所有的偏好设置对系统的所有用户公开,第三方APP有读没有写的权限;
2.system:包含各种各样的用户偏好系统设置;
3.secure:安全性的用户偏好系统设置,第三方APP有读没有写的权限。
在java语言中的读写形式如下
//System
Settings.System.putInt(getActivity().getContentResolver(), "sound_effects_enabled", 1);
Settings.System.getInt(getActivity().getContentResolver(), "sound_effects_enabled", 1);
//Global
Settings.Global.getString(ActivityThread.currentApplication().getContentResolver(), "disable_list");
adb修改指令 举例
案例一
修改系统的全局变量
adb shell settings put global disable_list “kr.co.homematics.unoplus;com.google.android.youtube.tv”
列出global配置表中的所有属性值
adb shell
settings list global
检索对应的属性值
settings list global |grep disable
取出指定配置表中指定属性值
settings get global disable_list
设置(不存在就添加)属性值
settings put
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。