diff options
author | Marcos Marado <mmarado@cyngn.com> | 2015-01-19 15:40:21 +0000 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-26 16:09:10 -0700 |
commit | 588d74f4008f9e35873e8a403842f21358fd51e4 (patch) | |
tree | 47a0e130b1d39cdc66a6a9421b31da967c8cf6b2 /packages/SettingsProvider | |
parent | ed292165842f2c71e2a35f043258f757f0edef6e (diff) | |
download | frameworks_base-588d74f4008f9e35873e8a403842f21358fd51e4.zip frameworks_base-588d74f4008f9e35873e8a403842f21358fd51e4.tar.gz frameworks_base-588d74f4008f9e35873e8a403842f21358fd51e4.tar.bz2 |
protected SMS [1/4]
Ports "protected SMS" from CM11:
* Add API for protected SMS receive broadcasts.
Change-Id: I5dfeb94832eefac9607070e9fb29db589bac7a57
* SettingsProvider: fix load protected sms setting logic
Change-Id: I7d03821c5f5ac5d24445e5c03f7911c3a81c16dd
Change-Id: Ifd31eb9558e397bf92f4cdb87f9e2056bc71d22f
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/res/values/defaults.xml | 2 | ||||
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index eef03ad..8e2ebd1 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -226,4 +226,6 @@ <!-- Default for Settings.System.STATUS_BAR_NOTIF_COUNT. --> <integer name="def_notif_count">0</integer> + <!-- Default protected sms originating address values of Settings.Secure.PROTECTED_SMS_ADDRESSES --> + <string-array name="def_protected_sms_list_values"></string-array> </resources> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 98a0d0d..62e1223 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -57,6 +57,7 @@ import org.xmlpull.v1.XmlPullParserException; import java.io.File; import java.io.IOException; +import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -2347,6 +2348,16 @@ class DatabaseHelper extends SQLiteOpenHelper { } } + private void loadProtectedSmsSetting(SQLiteStatement stmt) { + String[] regAddresses = mContext.getResources() + .getStringArray(R.array.def_protected_sms_list_values); + if (regAddresses.length > 0) { + loadSetting(stmt, + Settings.Secure.PROTECTED_SMS_ADDRESSES, + TextUtils.join("|", regAddresses)); + } + } + private void loadSettings(SQLiteDatabase db) { loadSystemSettings(db); loadSecureSettings(db); |