frameworks/base/packages/SettingsProvider/res/values/defaults.xml
相关的代码
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
//wfy
private void loadSystemSettings(SQLiteDatabase db) {
SQLiteStatement stmt = null;
try {
stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
+ " VALUES(?,?);");
loadBooleanSetting(stmt, Settings.System.DIM_SCREEN,
R.bool.def_dim_screen);
loadSetting(stmt, Settings.System.SCREEN_OFF_TIMEOUT,
SystemProperties.getInt("ro.rk.screenoff_time", mContext.getResources().getInteger(R.integer.def_screen_off_timeout)));
// Set default cdma DTMF type
loadSetting(stmt, Settings.System.DTMF_TONE_TYPE_WHEN_DIALING, 0);
// Set default hearing aid
loadSetting(stmt, Settings.System.HEARING_AID, 0);
// Set default tty mode
loadSetting(stmt, Settings.System.TTY_MODE, 0);
loadBooleanSetting(stmt, Settings.System.SCREENSHOT_BUTTON_SHOW,
R.bool.def_screenshot_button_show);
loadSetting(stmt, Settings.System.SCREENSHOT_LOCATION,
Settings.System.SCREENSHOT_LOCATION_INTERNAL_SD);
loadIntegerSetting(stmt, Settings.System.SCREEN_BRIGHTNESS,
R.integer.def_screen_brightness);
loadBooleanSetting(stmt, Settings.System.SCREEN_BRIGHTNESS_MODE,
R.bool.def_screen_brightness_automatic_mode);
loadDefaultAnimationSettings(stmt);
loadBooleanSetting(stmt, Settings.System.ACCELEROMETER_ROTATION,
R.bool.def_accelerometer_rotation);
loadDefaultHapticSettings(stmt);
loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE,
R.bool.def_notification_pulse);
loadUISoundEffectsSettings(stmt);
loadIntegerSetting(stmt, Settings.System.POINTER_SPEED,
R.integer.def_pointer_speed);
/*
* IMPORTANT: Do not add any more upgrade steps here as the global,
* secure, and system settings are no longer stored in a database
* but are kept in memory and persisted to XML.
*
* See: SettingsProvider.UpgradeController#onUpgradeLocked
*/
} finally {
if (stmt != null) stmt.close();
}
}