Android的系统设置数据存放在/data/data/com.android.providers.settings/databases/settings.db 中
-
adb shell settings get secure default_input_method
-
adb shell settings get system screen_brightness_mode
-
adb shell settings get system screen_brightness
-
adb shell settings put system screen_brightness 150
数据库结构如下:
数据库中的默认数据在frameworks/base/packages/SettingsProvider/res/values/defaults.xml中定义
通过frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java对数据库结构及初始值进行初始化。
如果要在系统中添加默认设置,需要如下步骤(以带物理键盘的系统中默认打开软键盘为例):
1、在defaults.xml中为新加的数据定义一个默认值
<integer name="show_ime_with_hard_keyboard">1</integer>
2、在DatabaseHelper.java中的loadSecureSettings(SQLiteDatabase db)方法中加入新字段的添加代码
loadStringSetting(stmt, Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD, R.string.show_ime_with_hard_keyboar);
3、重新编译
Android L (5.1)及以前的版本
Settings参数保存在 /data/data/com.android.providers.settings/databases/settings.db里,里面有三个表global, system, secure.
通常这样查看数据
adb shell sqlite3 data/data/com.android.providers.settings/databases/settings.db “select * from secure”
或者adb pull settings.db到本地,然后用sqlite expert打开即可。
Android M (6.0)开始出现变化
不同用户放不同的路径下,如果没有创建新用户,则在/data/system/users/0下
settings_global.xml, settings_system.xml, settings_secure.xml
直接修改例子
adb shell settings get global captive_portal_server
adb shell settings put global captive_portal_server 0
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2009, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<bool name="def_dim_screen">true</bool>
<integer name="def_screen_off_timeout">60000</integer>
<bool name="def_airplane_mode_on">false</bool>
<!-- Comma-separated list of bluetooth, wifi, and cell. -->
<string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi,nfc,wimax</string>
<string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi,nfc</string>
<bool name="def_auto_time">true</bool>
<bool name="def_auto_time_zone">true</bool>
<bool name="def_accelerometer_rotation">true</bool>
<!-- Default screen brightness, from 0 to 255. 102 is 40%. -->
<integer name="def_screen_brightness">102</integer>
<bool name="def_screen_brightness_automatic_mode">false</bool>
<fraction name="def_window_animation_scale">100%</fraction>
<fraction name="def_window_transition_scale">100%</fraction>
<bool name="def_haptic_feedback">true</bool>
<bool name="def_bluetooth_on">false</bool>
<bool name="def_wifi_display_on">false</bool>
<bool name="def_install_non_market_apps">false</bool>
<bool name="def_package_verifier_enable">true</bool>
<!-- Comma-separated list of location providers.
Network location is off by default because it requires
user opt-in via Setup Wizard or Settings.
-->
<string name="def_location_providers_allowed" translatable="false">gps</string>
<bool name="assisted_gps_enabled">true</bool>
<bool name="def_netstats_enabled">true</bool>
<bool name="def_usb_mass_storage_enabled">true</bool>
<bool name="def_wifi_on">false</bool>
<!-- 0 == never, 1 == only when plugged in, 2 == always -->
<integer name="def_wifi_sleep_policy">2</integer>
<bool name="def_networks_available_notification_on">true</bool>
<bool name="def_backup_enabled">false</bool>
<!--string name="def_backup_transport" translatable="false">android/com.android.internal.backup.LocalTransport</string-->
<string name="def_backup_transport" translatable="false">com.google.android.backup/.BackupTransportService</string>
<!-- Default value for whether or not to pulse the notification LED when there is a
pending notification -->
<bool name="def_notification_pulse">true</bool>
<bool name="def_mount_play_notification_snd">true</bool>
<bool name="def_mount_ums_autostart">false</bool>
<bool name="def_mount_ums_prompt">true</bool>
<bool name="def_mount_ums_notify_enabled">true</bool>
<!-- user interface sound effects -->
<integer name="def_power_sounds_enabled">1</integer>
<string name="def_low_battery_sound" translatable="false">/system/media/audio/ui/LowBattery.ogg</string>
<integer name="def_dock_sounds_enabled">0</integer>
<string name="def_desk_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string>
<string name="def_desk_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string>
<string name="def_car_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string>
<string name="def_car_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string>
<integer name="def_lockscreen_sounds_enabled">1</integer>
<string name="def_lock_sound" translatable="false">/system/media/audio/ui/Lock.ogg</string>
<string name="def_unlock_sound" translatable="false">/system/media/audio/ui/Unlock.ogg</string>
<string name="def_wireless_charging_started_sound" translatable="false">/system/media/audio/ui/WirelessChargingStarted.ogg</string>
<bool name="def_lockscreen_disabled">false</bool>
<bool name="def_device_provisioned">false</bool>
<integer name="def_dock_audio_media_enabled">1</integer>
<!-- Notifications use ringer volume -->
<bool name="def_notifications_use_ring_volume">true</bool>
<!-- Default for Settings.System.VIBRATE_IN_SILENT -->
<bool name="def_vibrate_in_silent">true</bool>
<!-- Default for Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION -->
<bool name="def_accessibility_script_injection">false</bool>
<!-- Default for Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD -->
<bool name="def_accessibility_speak_password">false</bool>
<!-- Default for Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS -->
<string name="def_accessibility_web_content_key_bindings" translatable="false">
<!-- DPAD/Trackball UP - traverse previous on current axis and send an event. -->
0x13=0x01000100;
<!-- DPAD/Trackball DOWN - traverse next on current axis and send an event. -->
0x14=0x01010100;
<!-- DPAD/Trackball LEFT - traverse previous on the character navigation axis and send event. -->
0x15=0x02000001;
<!-- DPAD/Trackball RIGHT - traverse next on the character navigation axis end send event. -->
0x16=0x02010001;
<!-- Alt+DPAD/Trackball UP - go to the top of the document. -->
0x200000013=0x02000601;
<!-- Alt+DPAD/Trackball DOWN - go to the bottom of the document. -->
0x200000014=0x02010601;
<!-- Alt+DPAD/Trackball LEFT - transition from an axis to another and sends an event.-->
<!-- Axis transitions: 2 -> 1; -->
0x200000015=0x03020101;
<!-- Alt+DPAD/Trackball RIGHT - transition from an axis to another and sends an event. -->
<!-- Axis transitions: 1 -> 2; -->
0x200000016=0x03010201;
<!-- Alt+g - go to the previous heading and send an event. -->
0x200000023=0x02000301;
<!-- Alt+h - go to the next heading and send an event. -->
0x200000024=0x02010301;
<!-- Alt+COMMA - transition to sentence navigation axis and send an event. -->
<!-- Axis transitions: 7 -> 2; -->
0x200000037=0x03070201;
<!-- Alt+PERIOD - transition to default web view behavior axis and send an event. -->
<!-- Axis transitions: 0 -> 7; 1 - > 7; 2 -> 7; -->
0x200000038=0x03000701:0x03010701:0x03020701;
</string>
<!-- Default for Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION_URL -->
<string name="def_accessibility_screen_reader_url" translatable="false">
https://ssl.gstatic.com/accessibility/javascript/android/AndroidVox_v1.js
</string>
<!-- Default for Settings.Secure.TOUCH_EXPLORATION_ENABLED -->
<bool name="def_touch_exploration_enabled">false</bool>
<!-- Default value for Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE -->
<fraction name="def_accessibility_display_magnification_scale">200%</fraction>
<!-- Default value for Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED -->
<bool name="def_accessibility_display_magnification_enabled">false</bool>
<!-- Default value for Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE -->
<bool name="def_accessibility_display_magnification_auto_update">true</bool>
<!-- Default for Settings.System.USER_ROTATION -->
<integer name="def_user_rotation">0</integer>
<!-- Default for Settings.Secure.DOWNLOAD_MAX_BYTES_OVER_MOBILE. <=0 if no limit -->
<integer name="def_download_manager_max_bytes_over_mobile">-1</integer>
<!-- Default for Settings.Secure.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE. <=0 if no limit -->
<integer name="def_download_manager_recommended_max_bytes_over_mobile">-1</integer>
<!-- Default for Settings.Secure.LONG_PRESS_TIMEOUT_MILLIS -->
<integer name="def_long_press_timeout_millis">500</integer>
<!-- Default for Settings.System.POINTER_SPEED -->
<integer name="def_pointer_speed">0</integer>
<!-- Default for DTMF tones enabled -->
<bool name="def_dtmf_tones_enabled">true</bool>
<!-- M: Default for UI touch sounds disabled ,google defaulit is enable -->
<bool name="def_sound_effects_enabled">false</bool>
<!-- Development settings -->
<bool name="def_stay_on_while_plugged_in">false</bool>
<!-- Number of retries for connecting to DHCP.
Value here is the same as WifiStateMachine.DEFAULT_MAX_DHCP_RETRIES -->
<integer name="def_max_dhcp_retries">9</integer>
<!-- Default for Settings.Secure.USER_SETUP_COMPLETE -->
<bool name="def_user_setup_complete">false</bool>
<!-- Default for Settings.Global.LOW_BATTERY_SOUND_TIMEOUT.
0 means no timeout; battery sounds will always play
>0 is milliseconds of screen-off time after which battery sounds will not play -->
<integer name="def_low_battery_sound_timeout">0</integer>
</resources>
frameworks中跟Setting默认值相关的几个文件
/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
在defaults.xml文件中定义了相关的值,DatabaseHelper.java会把相应的值读取出来保存到ContentProvider
下面就来看下defaults.xml中定义了哪些值
上 面的xml定义中String有一个属性translatable="false"表示多国语言时不需要进行翻译,这里就不对上面的定义一一解释,只对& lt;string name="def_location_providers_allowed" translatable="false">gps</string>进行分析
在DatabaseHelper.java中有一个函数来加载.xml中的字段
private void loadSecureSettings(SQLiteDatabase db) {
SQLiteStatement stmt = null;
try {
stmt = db.compileStatement("INSERT OR IGNORE INTO secure(name,value)"
+ " VALUES(?,?);");
loadSetting(stmt, Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
mUtils.getStringValue(Settings.Secure.LOCATION_PROVIDERS_ALLOWED, R.string.def_location_providers_allowed));
String wifiWatchList = SystemProperties.get("ro.com.android.wifi-watchlist");
if (!TextUtils.isEmpty(wifiWatchList)) {
loadSetting(stmt, Settings.Secure.WIFI_WATCHDOG_WATCH_LIST, wifiWatchList);
}
// Don't do this. The SystemServer will initialize ADB_ENABLED from a
// persistent system property instead.
loadSetting(stmt, Settings.Secure.ADB_ENABLED, 1);
// Allow mock locations default, based on build
loadSetting(stmt, Settings.Secure.ALLOW_MOCK_LOCATION,
"1".equals(SystemProperties.get("ro.allow.mock.location")) ? 1 : 0);
loadSecure35Settings(stmt);
loadBooleanSetting(stmt, Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND,
R.bool.def_mount_play_notification_snd);
loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_AUTOSTART,
R.bool.def_mount_ums_autostart);
loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_PROMPT,
R.bool.def_mount_ums_prompt);
loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED,
R.bool.def_mount_ums_notify_enabled);
loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION,
R.bool.def_accessibility_script_injection);
loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS,
R.string.def_accessibility_web_content_key_bindings);
loadIntegerSetting(stmt, Settings.Secure.LONG_PRESS_TIMEOUT,
R.integer.def_long_press_timeout_millis);
loadBooleanSetting(stmt, Settings.Secure.TOUCH_EXPLORATION_ENABLED,
R.bool.def_touch_exploration_enabled);
loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD,
R.bool.def_accessibility_speak_password);
loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_SCREEN_READER_URL,
R.string.def_accessibility_screen_reader_url);
if (SystemProperties.getBoolean("ro.lockscreen.disable.default", false) == true) {
loadSetting(stmt, Settings.System.LOCKSCREEN_DISABLED, "1");
} else {
loadBooleanSetting(stmt, Settings.System.LOCKSCREEN_DISABLED,
R.bool.def_lockscreen_disabled);
}
loadBooleanSetting(stmt, Settings.Secure.SCREENSAVER_ENABLED,
com.android.internal.R.bool.config_dreamsEnabledByDefault);
loadBooleanSetting(stmt, Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK,
com.android.internal.R.bool.config_dreamsActivatedOnDockByDefault);
loadBooleanSetting(stmt, Settings.Secure.SCREENSAVER_ACTIVATE_ON_SLEEP,
com.android.internal.R.bool.config_dreamsActivatedOnSleepByDefault);
loadStringSetting(stmt, Settings.Secure.SCREENSAVER_COMPONENTS,
com.android.internal.R.string.config_dreamsDefaultComponent);
loadStringSetting(stmt, Settings.Secure.SCREENSAVER_DEFAULT_COMPONENT,
com.android.internal.R.string.config_dreamsDefaultComponent);
loadBooleanSetting(stmt, Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
R.bool.def_accessibility_display_magnification_enabled);
loadFractionSetting(stmt, Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
R.fraction.def_accessibility_display_magnification_scale, 1);
loadBooleanSetting(stmt,
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE,
R.bool.def_accessibility_display_magnification_auto_update);
loadBooleanSetting(stmt, Settings.Secure.USER_SETUP_COMPLETE,
R.bool.def_user_setup_complete);
mUtils.loadCustomSecureSettings(stmt);
} finally {
if (stmt != null) stmt.close();
}
}
在上面的代码中有
loadSetting(stmt, Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
mUtils.getStringValue(Settings.Secure.LOCATION_PROVIDERS_ALLOWED, R.string.def_location_providers_allowed));去加载字符串,保存到数据库中,数据库名称为:
private static final String DATABASE_NAME = "settings.db";
static String dbNameForUser(final int userHandle) {
// The owner gets the unadorned db name;
if (userHandle == UserHandle.USER_OWNER) {
return DATABASE_NAME;
} else {
// Place the database in the user-specific data tree so that it's
// cleaned up automatically when the user is deleted.
File databaseFile = new File(
Environment.getUserSystemDirectory(userHandle), DATABASE_NAME);
return databaseFile.getPath();
}
}
public DatabaseHelper(Context context, int userHandle) {
super(context, dbNameForUser(userHandle), null, DATABASE_VERSION);
mContext = context;
mUserHandle = userHandle;
}
来看下是如何读取ContentProvider中的数据,在Setting中就可以使用getContentResolver()去查询对应的字段
当然并不是所有的默认值都是通过读取defaults.xml的,也有的是在DatabaseHelper.java中直接设置
如loadSetting(stmt, Settings.Secure.ADB_ENABLED, 1); 这个ADB Debugging开关就是直接在数据库文件中写入的。
关于USB Debugging 开关也可以在systemui的systemui/usb/StorageNotification.java文件中去设置,可以判断是否有IMEI号
分析代码时如果发现在defaults.xml找不到这一项就直接在DatabaseHelper.java文件中查找。
1,是否有默认值
在寻找一个开关的默认值时,首先要明白一点,该开关是否存在默认值,以及该开关状态是否有状态保存(一般状态存储在settings的db中)。 判断条件: 在reboot(重启)之后开关状态仍旧保存或者是在reset(恢复出厂设置)之后开关状态恢复到默认的,才能找到默认值。 在reboot之后开关状态仍旧保存的,表示状态存储在了db中。 在reset之后开关状态恢复默认的,表示状态有一个默认值。
比如像wiif开关,蓝牙开关,gps开关等,都有默认值,并且状态值都在db中保存。
至于像WiFi热点开关这种在reboot之后,状态没有保存,那么你就别白费力气来找他的默认值或者状态存储值了
2,修改默认值
大部分的开关状态都存储在了SettingProvider的db中,与状态值相关的有三个文件
- /frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java:该文件中对状态值进行存储
- /frameworks/base/packages/SettingsProvider/res/values/defaults.xml:定义了开关状态的默认值
- /frameworks/base/core/java/android/provider/Settings.java:定义了各开关状态默认值存储时对应的key
接下里看都有什么默认值
value |
含义 |
key |
---|---|---|
def_dim_screen |
0=no 1=yes:是否让屏幕亮度渐渐变暗 |
Settings.System.DIM_SCREEN |
def_screen_off_timeout |
无操作多少秒后灭屏 |
Settings.System.SCREEN_OFF_TIMEOUT |
def_sleep_timeout |
无操作多少秒后休眠(该值要比灭屏时间长,因为在休眠之前会先灭屏) |
Settings.Secure.SLEEP_TIMEOUT |
def_airplane_mode_on |
飞行模式是否默认开启 |
Settings.Global.AIRPLANE_MODE_ON |
def_theater_mode_on |
剧场模式是否默认开启 |
Settings.Global.THEATER_MODE_ON |
def_airplane_mode_radios |
开启飞行模式时会关掉的开关列表(通常会包括蓝牙,wifi,nfc等) |
Settings.Global.AIRPLANE_MODE_RADIOS |
airplane_mode_toggleable_radios |
飞行模式下用户可以手动开启的开关列表 |
Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS |
def_auto_time |
1=yes, 0=no是否从网络自动同步日期、时间、时区 |
Settings.Global.AUTO_TIME |
def_auto_time_zone |
1=yes, 0=no是否从网络自动同步时区 |
Settings.Global.AUTO_TIME_ZONE |
def_accelerometer_rotation |
1=yes, 0=no是否开启自动旋转(即是否根据加速度传感器旋转屏幕方向) |
Settings.System.ACCELEROMETER_ROTATION |
def_screen_brightness |
屏幕默认亮度(取值区间为0–255) |
Settings.System.SCREEN_BRIGHTNESS |
def_screen_brightness_automatic_mode |
是否开启屏幕亮度的自动调节 |
Settings.System.SCREEN_BRIGHTNESS_MODE |
def_window_animation_scale |
1=yes, 0=no窗口动画缩放 |
Settings.System.WINDOW_ANIMATION_SCALE |
def_window_transition_scale |
1=yes, 0=no窗口透明度 |
Settings.System.TRANSITION_ANIMATION_SCALE |
def_haptic_feedback |
是否开启触摸反馈,不清楚什么含义 |
Settings.System.HAPTIC_FEEDBACK_ENABLED |
def_bluetooth_on |
0=disabled. 1=enabled.默认是否开启蓝牙 |
Settings.Global.BLUETOOTH_ON |
def_wifi_display_on |
0=disabled. 1=enabled.是否开启wifi显示 |
Settings.Global.WIFI_DISPLAY_ON |
def_install_non_market_apps |
是否允许安装不是在应用市场下载的app:1 = 允许通过安装包安装,0 = 不允许通过安装包安装 |
Settings.Secure.INSTALL_NON_MARKET_APPS |
def_package_verifier_enable |
在安装app之前进行证书检查,1审查,0不审查 |
Settings.Global.PACKAGE_VERIFIER_ENABLE |
def_location_providers_allowed |
是否开启gps,若字符串为null则默认不开启gps,还需借助LOCATION_MODE进行判断 |
Settings.Secure.LOCATION_PROVIDERS_ALLOWED |
assisted_gps_enabled |
是否开启辅助的gps应用 |
Settings.Global.ASSISTED_GPS_ENABLED |
def_netstats_enabled |
是否开启流量统计 |
Settings.Global.NETSTATS_ENABLED |
def_usb_mass_storage_enabled |
是否开启usb海量存储 |
Settings.Global.USB_MASS_STORAGE_ENABLED |
def_wifi_on |
wifi默认是否开启 |
Settings.Global.WIFI_ON |
def_wifi_sleep_policy |
wifi是否休眠(会和移动网络来回切换)取值为0-never, 1-only when plugged in, 2-always |
Settings.Global.WIFI_SLEEP_POLICY |
def_networks_available_notification_on |
是否通知用户打开网络 |
Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON |
def_backup_enabled |
0-disabled, 1-enabled是否开启设置备份 |
Settings.Secure.BACKUP_ENABLED |
def_backup_transport |
用于备份或者恢复的传输文件 |
Settings.Secure.BACKUP_TRANSPORT |
def_notification_pulse |
当有通知来时,led灯是否要重复闪烁 |
Settings.System.NOTIFICATION_LIGHT_PULSE |
def_mount_play_notification_snd |
当有事件来临时是否播放通知铃声 |
Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND |
def_mount_ums_autostart |
是否自动启动主机检测系统 |
Settings.Secure.MOUNT_UMS_AUTOSTART |
def_mount_ums_prompt |
是否在主机检测时显示通知 |
Settings.Secure.MOUNT_UMS_PROMPT |
def_mount_ums_notify_enabled |
Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED |
当开启ums时是否显示通知 |
def_power_sounds_enabled |
电量过低时是否铃声通知 |
Settings.Global.POWER_SOUNDS_ENABLED |
def_low_battery_sound |
低电量时播放的铃声文件来源 |
Settings.Global.LOW_BATTERY_SOUND |
def_dock_sounds_enabled |
当插拔电源时是否播放声音 |
Settings.Global.DOCK_SOUNDS_ENABLED |
def_desk_dock_sound |
插上电源时播放的音频文件 |
Settings.Global.DESK_DOCK_SOUND |
def_desk_undock_sound |
拔下电源时播放的音频文件 |
Settings.Global.DESK_UNDOCK_SOUND |
def_car_dock_sound |
使用车载电源充电时播放的音频文件 |
Settings.Global.CAR_DOCK_SOUND |
def_car_undock_sound |
当从车载电源拔下时播放的音频文件 |
Settings.Global.CAR_UNDOCK_SOUND |
def_lockscreen_sounds_enabled |
当解锁或是锁屏时是否播放声音 |
Settings.System.LOCKSCREEN_SOUNDS_ENABLED |
def_lock_sound |
锁屏时播放的音频文件 |
Settings.Global.LOCK_SOUND |
def_unlock_sound |
解锁时播放的音频文件 |
Settings.Global.UNLOCK_SOUND |
def_trusted_sound |
在未解锁的情况下设备进入到可信任状态时播放的音频文件 |
Settings.Global.TRUSTED_SOUND |
def_wireless_charging_started_sound |
开启无线充电时播放声音 |
Settings.Global.WIRELESS_CHARGING_STARTED_SOUND |
def_lockscreen_disabled |
第一次开机时默认不锁屏(若要彻底去掉锁屏页面还需要在别的方法中设置) |
Settings.System.LOCKSCREEN_DISABLED |
def_device_provisioned |
设备是否已经被配置(该参数考虑的时多用户不同时刻使用同一个设备的情况) |
Settings.Global.DEVICE_PROVISIONED |
def_dock_audio_media_enabled |
使用dock音频输出媒体 |
Settings.Global.DOCK_AUDIO_MEDIA_ENABLED |
def_vibrate_in_silent |
静音模式下是否允许震动 |
Settings.System.VIBRATE_IN_SILENT |
def_accessibility_script_injection |
是否增强js的屏幕阅读性 |
Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION |
def_accessibility_speak_password |
访问模式下是否语音播报密码 |
Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD |
def_low_battery_sound_timeout |
当经过一定时间后,如果低电量提醒为播放声音,则灭屏 |
Settings.Global.LOW_BATTERY_SOUND_TIMEOUT |
def_lock_screen_show_notifications |
是否在锁屏界面显示通知 |
Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS |
def_lock_screen_allow_private_notifications |
允许在锁屏界面上显示私有通知,就像是解锁状态下一样 |
Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS |
def_wifi_scan_always_available |
设置-wlan-高级-随时扫描开关 |
Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE |