cmsdk: Load notification led customization defaults

Issue-Id: YAM-34

Change-Id: I67395465eb830ae994d8d796a4dbdae08ade5b01
This commit is contained in:
Edward Wang 2016-01-13 14:55:38 -08:00 committed by Gerrit Code Review
parent bf9cc6dfe1
commit b9f80b66fd
2 changed files with 14 additions and 0 deletions

View File

@ -82,4 +82,9 @@
<!-- Default value for whether or not to use multiple notification LEDs
on devices equiped with more than one LED -->
<bool name="def_notification_multiple_leds">false</bool>
<!-- Default value for notification LED customization -->
<bool name="def_notification_pulse_custom_enable">false</bool>
<string name="def_notification_pulse_custom_value"></string>
</resources>

View File

@ -257,6 +257,15 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
loadIntegerSetting(db, CMTableNames.TABLE_SYSTEM, CMSettings.System.ENABLE_PEOPLE_LOOKUP,
R.integer.def_people_lookup);
loadBooleanSetting(db, CMTableNames.TABLE_SYSTEM, CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_ENABLE,
R.bool.def_notification_pulse_custom_enable);
if (mContext.getResources().getBoolean(R.bool.def_notification_pulse_custom_enable)) {
loadStringSetting(db, CMTableNames.TABLE_SYSTEM, CMSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES,
R.string.def_notification_pulse_custom_value);
}
}
private void loadGlobalSettings(SQLiteDatabase db) {