From b9f80b66fded99fd37dc4a0d55ab750a1fc59f18 Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Wed, 13 Jan 2016 14:55:38 -0800 Subject: [PATCH] cmsdk: Load notification led customization defaults Issue-Id: YAM-34 Change-Id: I67395465eb830ae994d8d796a4dbdae08ade5b01 --- packages/CMSettingsProvider/res/values/defaults.xml | 5 +++++ .../src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/packages/CMSettingsProvider/res/values/defaults.xml b/packages/CMSettingsProvider/res/values/defaults.xml index a3491b0..70fb529 100644 --- a/packages/CMSettingsProvider/res/values/defaults.xml +++ b/packages/CMSettingsProvider/res/values/defaults.xml @@ -82,4 +82,9 @@ false + + + false + + diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java index ce4c4a2..07600ca 100644 --- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java +++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java @@ -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) {