Loading src/java/com/android/internal/telephony/IccSmsInterfaceManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -338,6 +338,7 @@ public class IccSmsInterfaceManager { public void sendDataWithSelfPermissions(String callingPackage, String destAddr, String scAddr, int destPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent) { if (!checkCallingOrSelfSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendDataInternal(destAddr, scAddr, destPort, data, sentIntent, deliveryIntent); Loading @@ -350,6 +351,7 @@ public class IccSmsInterfaceManager { public void sendData(String callingPackage, String destAddr, String scAddr, int destPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent) { if (!checkCallingSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendDataInternal(destAddr, scAddr, destPort, data, sentIntent, deliveryIntent); Loading Loading @@ -402,6 +404,7 @@ public class IccSmsInterfaceManager { boolean persistMessageForNonDefaultSmsApp) { if (!checkCallingSendTextPermissions( persistMessageForNonDefaultSmsApp, callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendTextInternal(callingPackage, destAddr, scAddr, text, sentIntent, deliveryIntent, Loading @@ -417,6 +420,7 @@ public class IccSmsInterfaceManager { String text, PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessage) { if (!checkCallingOrSelfSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendTextInternal(callingPackage, destAddr, scAddr, text, sentIntent, deliveryIntent, Loading Loading @@ -538,6 +542,7 @@ public class IccSmsInterfaceManager { boolean persistMessageForNonDefaultSmsApp, int priority, boolean expectMore, int validityPeriod) { if (!checkCallingOrSelfSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendTextInternal(callingPackage, destAddr, scAddr, text, sentIntent, deliveryIntent, Loading Loading @@ -666,6 +671,7 @@ public class IccSmsInterfaceManager { int priority, boolean expectMore, int validityPeriod) { if (!checkCallingSendTextPermissions( persistMessageForNonDefaultSmsApp, callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntents); return; } if (Rlog.isLoggable("SMS", Log.VERBOSE)) { Loading Loading @@ -1100,6 +1106,7 @@ public class IccSmsInterfaceManager { public void sendStoredText(String callingPkg, Uri messageUri, String scAddress, PendingIntent sentIntent, PendingIntent deliveryIntent) { if (!checkCallingSendSmsPermission(callingPkg, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } if (Rlog.isLoggable("SMS", Log.VERBOSE)) { Loading Loading @@ -1128,6 +1135,7 @@ public class IccSmsInterfaceManager { public void sendStoredMultipartText(String callingPkg, Uri messageUri, String scAddress, List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents) { if (!checkCallingSendSmsPermission(callingPkg, "Sending SMS message")) { returnUnspecifiedFailure(sentIntents); return; } final ContentResolver resolver = mContext.getContentResolver(); Loading src/java/com/android/internal/telephony/SMSDispatcher.java +11 −0 Original line number Diff line number Diff line Loading @@ -878,6 +878,16 @@ public abstract class SMSDispatcher extends Handler { } } private void triggerSentIntentForFailure(List<PendingIntent> sentIntents) { if (sentIntents == null) { return; } for (PendingIntent sentIntent : sentIntents) { triggerSentIntentForFailure(sentIntent); } } private boolean sendSmsByCarrierApp(boolean isDataSms, SmsTracker tracker ) { String carrierPackage = getCarrierAppPackageName(); if (carrierPackage != null) { Loading Loading @@ -1026,6 +1036,7 @@ public abstract class SMSDispatcher extends Handler { if (parts == null || trackers == null || trackers.length == 0 || trackers[0] == null) { Rlog.e(TAG, "Cannot send multipart text. parts=" + parts + " trackers=" + trackers); triggerSentIntentForFailure(sentIntents); return; } Loading src/java/com/android/internal/telephony/UiccSmsController.java +12 −4 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ public class UiccSmsController extends ISmsImplBase { } else { Rlog.e(LOG_TAG,"sendText iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } Loading Loading @@ -157,21 +158,23 @@ public class UiccSmsController extends ISmsImplBase { } else { Rlog.e(LOG_TAG,"sendText iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } @Override public void sendTextForSubscriberWithOptions(int subId, String callingPackage, String destAddr, String scAddr, String parts, PendingIntent sentIntents, PendingIntent deliveryIntents, boolean persistMessage, int priority, String destAddr, String scAddr, String parts, PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessage, int priority, boolean expectMore, int validityPeriod) { IccSmsInterfaceManager iccSmsIntMgr = getIccSmsInterfaceManager(subId); if (iccSmsIntMgr != null ) { iccSmsIntMgr.sendTextWithOptions(callingPackage, destAddr, scAddr, parts, sentIntents, deliveryIntents, persistMessage, priority, expectMore, validityPeriod); iccSmsIntMgr.sendTextWithOptions(callingPackage, destAddr, scAddr, parts, sentIntent, deliveryIntent, persistMessage, priority, expectMore, validityPeriod); } else { Rlog.e(LOG_TAG,"sendTextWithOptions iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } Loading Loading @@ -203,6 +206,7 @@ public class UiccSmsController extends ISmsImplBase { } else { Rlog.e(LOG_TAG,"sendMultipartTextWithOptions iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } Loading Loading @@ -440,6 +444,10 @@ public class UiccSmsController extends ISmsImplBase { } private void sendErrorInPendingIntents(List<PendingIntent> intents, int errorCode) { if (intents == null) { return; } for (PendingIntent intent : intents) { sendErrorInPendingIntent(intent, errorCode); } Loading Loading
src/java/com/android/internal/telephony/IccSmsInterfaceManager.java +8 −0 Original line number Diff line number Diff line Loading @@ -338,6 +338,7 @@ public class IccSmsInterfaceManager { public void sendDataWithSelfPermissions(String callingPackage, String destAddr, String scAddr, int destPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent) { if (!checkCallingOrSelfSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendDataInternal(destAddr, scAddr, destPort, data, sentIntent, deliveryIntent); Loading @@ -350,6 +351,7 @@ public class IccSmsInterfaceManager { public void sendData(String callingPackage, String destAddr, String scAddr, int destPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent) { if (!checkCallingSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendDataInternal(destAddr, scAddr, destPort, data, sentIntent, deliveryIntent); Loading Loading @@ -402,6 +404,7 @@ public class IccSmsInterfaceManager { boolean persistMessageForNonDefaultSmsApp) { if (!checkCallingSendTextPermissions( persistMessageForNonDefaultSmsApp, callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendTextInternal(callingPackage, destAddr, scAddr, text, sentIntent, deliveryIntent, Loading @@ -417,6 +420,7 @@ public class IccSmsInterfaceManager { String text, PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessage) { if (!checkCallingOrSelfSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendTextInternal(callingPackage, destAddr, scAddr, text, sentIntent, deliveryIntent, Loading Loading @@ -538,6 +542,7 @@ public class IccSmsInterfaceManager { boolean persistMessageForNonDefaultSmsApp, int priority, boolean expectMore, int validityPeriod) { if (!checkCallingOrSelfSendSmsPermission(callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } sendTextInternal(callingPackage, destAddr, scAddr, text, sentIntent, deliveryIntent, Loading Loading @@ -666,6 +671,7 @@ public class IccSmsInterfaceManager { int priority, boolean expectMore, int validityPeriod) { if (!checkCallingSendTextPermissions( persistMessageForNonDefaultSmsApp, callingPackage, "Sending SMS message")) { returnUnspecifiedFailure(sentIntents); return; } if (Rlog.isLoggable("SMS", Log.VERBOSE)) { Loading Loading @@ -1100,6 +1106,7 @@ public class IccSmsInterfaceManager { public void sendStoredText(String callingPkg, Uri messageUri, String scAddress, PendingIntent sentIntent, PendingIntent deliveryIntent) { if (!checkCallingSendSmsPermission(callingPkg, "Sending SMS message")) { returnUnspecifiedFailure(sentIntent); return; } if (Rlog.isLoggable("SMS", Log.VERBOSE)) { Loading Loading @@ -1128,6 +1135,7 @@ public class IccSmsInterfaceManager { public void sendStoredMultipartText(String callingPkg, Uri messageUri, String scAddress, List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents) { if (!checkCallingSendSmsPermission(callingPkg, "Sending SMS message")) { returnUnspecifiedFailure(sentIntents); return; } final ContentResolver resolver = mContext.getContentResolver(); Loading
src/java/com/android/internal/telephony/SMSDispatcher.java +11 −0 Original line number Diff line number Diff line Loading @@ -878,6 +878,16 @@ public abstract class SMSDispatcher extends Handler { } } private void triggerSentIntentForFailure(List<PendingIntent> sentIntents) { if (sentIntents == null) { return; } for (PendingIntent sentIntent : sentIntents) { triggerSentIntentForFailure(sentIntent); } } private boolean sendSmsByCarrierApp(boolean isDataSms, SmsTracker tracker ) { String carrierPackage = getCarrierAppPackageName(); if (carrierPackage != null) { Loading Loading @@ -1026,6 +1036,7 @@ public abstract class SMSDispatcher extends Handler { if (parts == null || trackers == null || trackers.length == 0 || trackers[0] == null) { Rlog.e(TAG, "Cannot send multipart text. parts=" + parts + " trackers=" + trackers); triggerSentIntentForFailure(sentIntents); return; } Loading
src/java/com/android/internal/telephony/UiccSmsController.java +12 −4 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ public class UiccSmsController extends ISmsImplBase { } else { Rlog.e(LOG_TAG,"sendText iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } Loading Loading @@ -157,21 +158,23 @@ public class UiccSmsController extends ISmsImplBase { } else { Rlog.e(LOG_TAG,"sendText iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } @Override public void sendTextForSubscriberWithOptions(int subId, String callingPackage, String destAddr, String scAddr, String parts, PendingIntent sentIntents, PendingIntent deliveryIntents, boolean persistMessage, int priority, String destAddr, String scAddr, String parts, PendingIntent sentIntent, PendingIntent deliveryIntent, boolean persistMessage, int priority, boolean expectMore, int validityPeriod) { IccSmsInterfaceManager iccSmsIntMgr = getIccSmsInterfaceManager(subId); if (iccSmsIntMgr != null ) { iccSmsIntMgr.sendTextWithOptions(callingPackage, destAddr, scAddr, parts, sentIntents, deliveryIntents, persistMessage, priority, expectMore, validityPeriod); iccSmsIntMgr.sendTextWithOptions(callingPackage, destAddr, scAddr, parts, sentIntent, deliveryIntent, persistMessage, priority, expectMore, validityPeriod); } else { Rlog.e(LOG_TAG,"sendTextWithOptions iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } Loading Loading @@ -203,6 +206,7 @@ public class UiccSmsController extends ISmsImplBase { } else { Rlog.e(LOG_TAG,"sendMultipartTextWithOptions iccSmsIntMgr is null for" + " Subscription: " + subId); sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_ERROR_GENERIC_FAILURE); } } Loading Loading @@ -440,6 +444,10 @@ public class UiccSmsController extends ISmsImplBase { } private void sendErrorInPendingIntents(List<PendingIntent> intents, int errorCode) { if (intents == null) { return; } for (PendingIntent intent : intents) { sendErrorInPendingIntent(intent, errorCode); } Loading