diff options
author | Tom Taylor <tomtaylor@google.com> | 2011-11-07 14:16:44 -0800 |
---|---|---|
committer | Tom Taylor <tomtaylor@google.com> | 2011-11-07 14:16:44 -0800 |
commit | 03da2f00aac04e6565a02cf5a9bf6bb1ec926930 (patch) | |
tree | c137b907a5aca791ff4a9c20292adc86e8efd415 /packages/SettingsProvider | |
parent | 064975c27cbca412e682fa152ce00af14027ab4f (diff) | |
download | frameworks_base-03da2f00aac04e6565a02cf5a9bf6bb1ec926930.zip frameworks_base-03da2f00aac04e6565a02cf5a9bf6bb1ec926930.tar.gz frameworks_base-03da2f00aac04e6565a02cf5a9bf6bb1ec926930.tar.bz2 |
Add new secure setting for controlling Messaging notifications
Bug 5552615
We're adding a new intent to allow 3rd party apps to disable
the Messaging app's notification. We want any app to be able to query
the setting of whether sms notifications are on or off, but only allow
system apps, particularly the Messaging app, to change that setting.
Other apps can change the setting by firing off an intent which brings
up a dialog activity in the Messaging app that'll let them turn off
Messaging notifications.
Change-Id: I4d2721191b86010efb383a24c28d911496440657
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/res/values/defaults.xml | 4 | ||||
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index 3920257..03d5bd2 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -133,4 +133,8 @@ <bool name="def_dtmf_tones_enabled">true</bool> <!-- Default for UI touch sounds enabled --> <bool name="def_sound_effects_enabled">true</bool> + + <!-- Default for Messaging app notifications enabled --> + <bool name="def_messaging_app_notifications_on">true</bool> + </resources> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 5495d08..44194f0 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -1472,6 +1472,10 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadBooleanSetting(stmt, Settings.Secure.TOUCH_EXPLORATION_ENABLED, R.bool.def_touch_exploration_enabled); + + loadBooleanSetting(stmt, Settings.Secure.MESSAGING_APP_NOTIFICATIONS, + R.bool.def_messaging_app_notifications_on); + } finally { if (stmt != null) stmt.close(); } |