summaryrefslogtreecommitdiffstats
path: root/src/java/com/android/internal/telephony/IccSmsInterfaceManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/android/internal/telephony/IccSmsInterfaceManager.java')
-rw-r--r--src/java/com/android/internal/telephony/IccSmsInterfaceManager.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/java/com/android/internal/telephony/IccSmsInterfaceManager.java b/src/java/com/android/internal/telephony/IccSmsInterfaceManager.java
index b4d13fd..dec58e6 100644
--- a/src/java/com/android/internal/telephony/IccSmsInterfaceManager.java
+++ b/src/java/com/android/internal/telephony/IccSmsInterfaceManager.java
@@ -18,6 +18,7 @@ package com.android.internal.telephony;
import android.app.PendingIntent;
import android.content.Context;
+import android.os.Binder;
import android.os.RemoteException;
import android.util.Log;
@@ -50,10 +51,6 @@ public abstract class IccSmsInterfaceManager extends ISms.Stub {
}
@Override
- public void registerSmsMiddleware(String name, ISmsMiddleware middleware) throws android.os.RemoteException {
- }
-
- @Override
public void synthesizeMessages(String originatingAddress, String scAddress, List<String> messages, long timestampMillis) throws RemoteException {
}
@@ -121,9 +118,11 @@ public abstract class IccSmsInterfaceManager extends ISms.Stub {
*/
public void sendText(String destAddr, String scAddr,
String text, PendingIntent sentIntent, PendingIntent deliveryIntent) {
- mPhone.getContext().enforceCallingPermission(
- "android.permission.SEND_SMS",
- "Sending SMS message");
+ if (Binder.getCallingPid() != android.os.Process.myPid()) {
+ mPhone.getContext().enforceCallingPermission(
+ "android.permission.SEND_SMS",
+ "Sending SMS message");
+ }
if (Log.isLoggable("SMS", Log.VERBOSE)) {
log("sendText: destAddr=" + destAddr + " scAddr=" + scAddr +
" text='"+ text + "' sentIntent=" +
@@ -159,9 +158,11 @@ public abstract class IccSmsInterfaceManager extends ISms.Stub {
*/
public void sendMultipartText(String destAddr, String scAddr, List<String> parts,
List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents) {
- mPhone.getContext().enforceCallingPermission(
- "android.permission.SEND_SMS",
- "Sending SMS message");
+ if (Binder.getCallingPid() != android.os.Process.myPid()) {
+ mPhone.getContext().enforceCallingPermission(
+ "android.permission.SEND_SMS",
+ "Sending SMS message");
+ }
if (Log.isLoggable("SMS", Log.VERBOSE)) {
int i = 0;
for (String part : parts) {