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
This commit is contained in:
committed by
Santos Cordon
parent
a5c9fd93cc
commit
149ceec6eb
@@ -98,6 +98,7 @@ package android {
|
||||
field public static final java.lang.String RECORD_AUDIO = "android.permission.RECORD_AUDIO";
|
||||
field public static final java.lang.String REORDER_TASKS = "android.permission.REORDER_TASKS";
|
||||
field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES";
|
||||
field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE";
|
||||
field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS";
|
||||
field public static final java.lang.String SET_ACTIVITY_WATCHER = "android.permission.SET_ACTIVITY_WATCHER";
|
||||
field public static final java.lang.String SET_ALARM = "com.android.alarm.permission.SET_ALARM";
|
||||
@@ -20997,6 +20998,7 @@ package android.telephony {
|
||||
method public boolean isNetworkRoaming();
|
||||
method public void listen(android.telephony.PhoneStateListener, int);
|
||||
field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
|
||||
field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
|
||||
field public static final int CALL_STATE_IDLE = 0; // 0x0
|
||||
field public static final int CALL_STATE_OFFHOOK = 2; // 0x2
|
||||
field public static final int CALL_STATE_RINGING = 1; // 0x1
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
android:permissionGroupFlags="personalInfo"
|
||||
android:priority="360"/>
|
||||
|
||||
<!-- Allows an application to send SMS messages. -->
|
||||
<!-- Allows an application to send SMS messages. -->
|
||||
<permission android:name="android.permission.SEND_SMS"
|
||||
android:permissionGroup="android.permission-group.MESSAGES"
|
||||
android:protectionLevel="dangerous"
|
||||
@@ -228,14 +228,13 @@
|
||||
android:label="@string/permlab_sendSms"
|
||||
android:description="@string/permdesc_sendSms" />
|
||||
|
||||
<!-- Allows an application to send SMS messages via the Messaging app with no user
|
||||
input or confirmation.
|
||||
@hide -->
|
||||
<permission android:name="android.permission.SEND_SMS_NO_CONFIRMATION"
|
||||
<!-- Allows an application (Phone) to send a request to other applications
|
||||
to handle the respond-via-message action during incoming calls. -->
|
||||
<permission android:name="android.permission.SEND_RESPOND_VIA_MESSAGE"
|
||||
android:permissionGroup="android.permission-group.MESSAGES"
|
||||
android:protectionLevel="signature|system"
|
||||
android:label="@string/permlab_sendSmsNoConfirmation"
|
||||
android:description="@string/permdesc_sendSmsNoConfirmation" />
|
||||
android:label="@string/permlab_sendRespondViaMessageRequest"
|
||||
android:description="@string/permdesc_sendRespondViaMessageRequest" />
|
||||
|
||||
<!-- Allows an application to monitor incoming SMS messages, to record
|
||||
or perform processing on them. -->
|
||||
|
||||
@@ -596,12 +596,12 @@
|
||||
This may result in unexpected charges. Malicious apps may cost you money by
|
||||
sending messages without your confirmation.</string>
|
||||
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permlab_sendSmsNoConfirmation">send SMS messages with no confirmation</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permdesc_sendSmsNoConfirmation">Allows the app to send SMS
|
||||
messages. This may result in unexpected charges. Malicious apps may cost
|
||||
you money by sending messages without your confirmation.</string>
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
|
||||
<string name="permlab_sendRespondViaMessageRequest">send respond-via-message events</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
|
||||
<string name="permdesc_sendRespondViaMessageRequest">Allows the app to send
|
||||
requests to other messaging apps to handle respond-via-message events for incoming
|
||||
calls.</string>
|
||||
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permlab_readSms">read your text messages (SMS or MMS)</string>
|
||||
|
||||
@@ -124,6 +124,28 @@ public class TelephonyManager {
|
||||
public static final String ACTION_PHONE_STATE_CHANGED =
|
||||
"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.
|
||||
* <p>
|
||||
* The intent-filter which consumes this Intent needs to be in a service which requires the
|
||||
* permission SEND_RESPOND_VIA_MESSAGE.
|
||||
*
|
||||
* <p>
|
||||
* {@link #getData} is a URI describing the recipient of the message.
|
||||
* <p>
|
||||
* The {@link android.intent.Intent#EXTRA_TEXT} extra contains the message
|
||||
* to send.
|
||||
* <p>
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user