summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTa-wei Yen <twyen@google.com>2016-06-16 12:57:50 -0700
committerTa-wei Yen <twyen@google.com>2016-06-16 12:57:50 -0700
commit262f17d4f383e800b0d4564e77e1a736e41b6bb0 (patch)
tree01f90071edc0cb447e7316eb328b1b946b857bb7
parent2ee565bf3e7c7379a36d46250d45c08d4e1fb010 (diff)
downloadbase-262f17d4f383e800b0d4564e77e1a736e41b6bb0.tar.gz
Allow the phone process to hide outbound text SMS
Bug: 29095322 Change-Id: Ibe91cc98c70e91563aae77d7f48f617a5fb65823
-rw-r--r--src/java/android/telephony/SmsManager.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/java/android/telephony/SmsManager.java b/src/java/android/telephony/SmsManager.java
index 189dc4b72a94..4df3b405c0e9 100644
--- a/src/java/android/telephony/SmsManager.java
+++ b/src/java/android/telephony/SmsManager.java
@@ -31,9 +31,9 @@ import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
+import com.android.internal.telephony.IMms;
import com.android.internal.telephony.ISms;
import com.android.internal.telephony.SmsRawData;
-import com.android.internal.telephony.IMms;
import com.android.internal.telephony.uicc.IccConstants;
import java.util.ArrayList;
@@ -335,11 +335,14 @@ public final class SmsManager {
* A variant of {@link SmsManager#sendTextMessage} that allows self to be the caller. This is
* for internal use only.
*
+ * @param persistMessage whether to persist the sent message in the SMS app. the caller must be
+ * the Phone process if set to false.
+ *
* @hide
*/
public void sendTextMessageWithSelfPermissions(
String destinationAddress, String scAddress, String text,
- PendingIntent sentIntent, PendingIntent deliveryIntent) {
+ PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessage) {
if (TextUtils.isEmpty(destinationAddress)) {
throw new IllegalArgumentException("Invalid destinationAddress");
}
@@ -353,7 +356,7 @@ public final class SmsManager {
iccISms.sendTextForSubscriberWithSelfPermissions(getSubscriptionId(),
ActivityThread.currentPackageName(),
destinationAddress,
- scAddress, text, sentIntent, deliveryIntent);
+ scAddress, text, sentIntent, deliveryIntent, persistMessage);
} catch (RemoteException ex) {
// ignore it
}