summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2011-11-07 14:16:44 -0800
committerTom Taylor <tomtaylor@google.com>2011-11-07 14:16:44 -0800
commit03da2f00aac04e6565a02cf5a9bf6bb1ec926930 (patch)
treec137b907a5aca791ff4a9c20292adc86e8efd415 /core
parent064975c27cbca412e682fa152ce00af14027ab4f (diff)
downloadframeworks_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 'core')
-rw-r--r--core/java/android/provider/Settings.java10
-rwxr-xr-xcore/java/android/provider/Telephony.java10
2 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index a0652f7..63b3664 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4068,6 +4068,13 @@ public final class Settings {
"contacts_preauth_uri_expiration";
/**
+ * Whether the Messaging app posts notifications.
+ * 0=disabled. 1=enabled.
+ */
+ public static final String MESSAGING_APP_NOTIFICATIONS = "messaging_app_notifications";
+
+
+ /**
* This are the settings to be backed up.
*
* NOTE: Settings are backed up and restored in the order they appear
@@ -4104,7 +4111,8 @@ public final class Settings {
MOUNT_UMS_NOTIFY_ENABLED,
UI_NIGHT_MODE,
LOCK_SCREEN_OWNER_INFO,
- LOCK_SCREEN_OWNER_INFO_ENABLED
+ LOCK_SCREEN_OWNER_INFO_ENABLED,
+ MESSAGING_APP_NOTIFICATIONS
};
/**
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index 0e6d07d..8eb9da1 100755
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -1838,5 +1838,15 @@ public final class Telephony {
public static final String EXTRA_PLMN = "plmn";
public static final String EXTRA_SHOW_SPN = "showSpn";
public static final String EXTRA_SPN = "spn";
+
+ /**
+ * Activity Action: Shows a dialog to turn off Messaging app notification.
+ * <p>Input: Nothing.
+ * <p>Output: Nothing.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_MESSAGING_APP_NOTIFICATIONS =
+ "android.provider.Telephony.MESSAGING_APP_NOTIFICATIONS";
+
}
}