Merge "Expose remaining READ_PHONE_STATE and SEND_SMS APIs to carrier apps." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2ca77fe976
@@ -17,6 +17,7 @@
|
|||||||
package android.telephony;
|
package android.telephony;
|
||||||
|
|
||||||
import android.annotation.RequiresPermission;
|
import android.annotation.RequiresPermission;
|
||||||
|
import android.annotation.SuppressAutoDoc;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.app.ActivityThread;
|
import android.app.ActivityThread;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
@@ -343,15 +344,16 @@ public final class SmsManager {
|
|||||||
* applications. Intended for internal carrier use only.
|
* applications. Intended for internal carrier use only.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>Requires Permission:
|
* <p>Requires Permission: Both {@link android.Manifest.permission#SEND_SMS} and
|
||||||
* {@link android.Manifest.permission#SEND_SMS} and
|
* {@link android.Manifest.permission#MODIFY_PHONE_STATE}, or that the calling app has carrier
|
||||||
* {@link android.Manifest.permission#MODIFY_PHONE_STATE} or the calling app has carrier
|
* privileges (see {@link TelephonyManager#hasCarrierPrivileges}), or that the calling app is
|
||||||
* privileges.
|
* the default IMS app (see
|
||||||
* </p>
|
* {@link CarrierConfigManager#KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING}).
|
||||||
*
|
*
|
||||||
* @see #sendTextMessage(String, String, String, PendingIntent, PendingIntent)
|
* @see #sendTextMessage(String, String, String, PendingIntent, PendingIntent)
|
||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
||||||
@RequiresPermission(allOf = {
|
@RequiresPermission(allOf = {
|
||||||
android.Manifest.permission.MODIFY_PHONE_STATE,
|
android.Manifest.permission.MODIFY_PHONE_STATE,
|
||||||
android.Manifest.permission.SEND_SMS
|
android.Manifest.permission.SEND_SMS
|
||||||
|
|||||||
@@ -1787,11 +1787,17 @@ public class TelephonyManager {
|
|||||||
* invalid subscription ID is pinned to the TelephonyManager, the returned config will contain
|
* invalid subscription ID is pinned to the TelephonyManager, the returned config will contain
|
||||||
* default values.
|
* default values.
|
||||||
*
|
*
|
||||||
|
* <p>This method may take several seconds to complete, so it should only be called from a
|
||||||
|
* worker thread.
|
||||||
|
*
|
||||||
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||||
|
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
|
||||||
|
*
|
||||||
* @see CarrierConfigManager#getConfigForSubId(int)
|
* @see CarrierConfigManager#getConfigForSubId(int)
|
||||||
* @see #createForSubscriptionId(int)
|
* @see #createForSubscriptionId(int)
|
||||||
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
||||||
*/
|
*/
|
||||||
// TODO(b/73136824, b/70041899): Permit carrier-privileged callers as well.
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
||||||
@WorkerThread
|
@WorkerThread
|
||||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
public PersistableBundle getCarrierConfig() {
|
public PersistableBundle getCarrierConfig() {
|
||||||
|
|||||||
Reference in New Issue
Block a user