From 9d7ea64900dba52a5a7f824cf6c779ce1c7992ba Mon Sep 17 00:00:00 2001 From: Amit Mahajan Date: Thu, 19 Aug 2021 09:58:27 -0700 Subject: [PATCH] Remove unused SmsManager API. This API can be called to send messages without persisting it in SMB db, and does not require any permission. It is not a public API and is not used by any app per go/nonsdk-dash-per-api Test: TH Bug: 195311502 Change-Id: I06c63024de7e44b4aa7cb43d72b2f298c8355118 --- .../java/android/telephony/SmsManager.java | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 73d17100abb2e..a0b8970ee56cf 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -773,37 +773,6 @@ public final class SmsManager { } } - /** - * Send a text based SMS without writing it into the SMS Provider. - * - *

Requires Permission: - * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or the calling app has carrier - * privileges. - *

- * - *

Note: This method is intended for internal use by carrier - * applications or the Telephony framework and will never trigger an SMS disambiguation - * dialog. If this method is called on a device that has multiple active subscriptions, this - * {@link SmsManager} instance has been created with {@link #getDefault()}, and no user-defined - * default subscription is defined, the subscription ID associated with this message will be - * INVALID, which will result in the SMS being sent on the subscription associated with logical - * slot 0. Use {@link #getSmsManagerForSubscriptionId(int)} to ensure the SMS is sent on the - * correct subscription. - *

- * - * @see #sendTextMessage(String, String, String, PendingIntent, - * PendingIntent, int, boolean, int) - * @hide - */ - @UnsupportedAppUsage - public void sendTextMessageWithoutPersisting( - String destinationAddress, String scAddress, String text, - PendingIntent sentIntent, PendingIntent deliveryIntent, int priority, - boolean expectMore, int validityPeriod) { - sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent, - false /* persistMessage */, priority, expectMore, validityPeriod); - } - /** * * Inject an SMS PDU into the android application framework.