From 149ceec6ebac9dd000c213fc91ee8e5c08522cc6 Mon Sep 17 00:00:00 2001 From: Daisuke Miyakawa Date: Mon, 26 Mar 2012 09:04:12 -0700 Subject: Sort out permission around "instant text response" - Remove SEND_SMS_NO_CONFIRMATION - Add SEND_RESPOND_VIA_MESSAGE Permission This permission is held by the phone and applications that want to handle respond-via-message should require this permission of the sender. This permission is signature/system and currently only held by the Phone app. Bug: 5108429 Change-Id: Ib611368d488de2f8e1e853f550eb2c654305eda4 --- .../java/android/telephony/TelephonyManager.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'telephony') diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 2e8de3b..80aa778 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -125,6 +125,28 @@ public class TelephonyManager { "android.intent.action.PHONE_STATE"; /** + * The Phone app sends this intent when a user opts to respond-via-message during an incoming + * call. By default, the MMS app consumes this message and sends a text message to the caller. A + * third party app can provide this functionality in lieu of MMS app by consuming this Intent + * and sending the message using their own messaging system. The intent contains a URI + * describing the recipient, and an EXTRA containg the message itself. + *

+ * The intent-filter which consumes this Intent needs to be in a service which requires the + * permission SEND_RESPOND_VIA_MESSAGE. + * + *

+ * {@link #getData} is a URI describing the recipient of the message. + *

+ * The {@link android.intent.Intent#EXTRA_TEXT} extra contains the message + * to send. + *

+ * Output: nothing. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_RESPOND_VIA_MESSAGE = + "android.intent.action.RESPOND_VIA_MESSAGE"; + + /** * The lookup key used with the {@link #ACTION_PHONE_STATE_CHANGED} broadcast * for a String containing the new call state. * -- cgit v1.1