Loading src/java/com/android/internal/telephony/ImsSmsDispatcher.java +4 −2 Original line number Diff line number Diff line Loading @@ -247,8 +247,10 @@ public class ImsSmsDispatcher extends SMSDispatcher { } @Override protected boolean shouldBlockSms() { return SMSDispatcherUtil.shouldBlockSms(isCdmaMo(), mPhone); protected boolean shouldBlockSmsForEcbm() { // We should not block outgoing SMS during ECM on IMS. It only applies to outgoing CDMA // SMS. return false; } @Override Loading src/java/com/android/internal/telephony/SMSDispatcher.java +3 −3 Original line number Diff line number Diff line Loading @@ -628,7 +628,7 @@ public abstract class SMSDispatcher extends Handler { * Send an SMS PDU. Usually just calls {@link sendRawPdu}. */ private void sendSubmitPdu(SmsTracker tracker) { if (shouldBlockSms()) { if (shouldBlockSmsForEcbm()) { Rlog.d(TAG, "Block SMS in Emergency Callback mode"); tracker.onFailed(mContext, SmsManager.RESULT_ERROR_NO_SERVICE, 0/*errorCode*/); } else { Loading @@ -637,9 +637,9 @@ public abstract class SMSDispatcher extends Handler { } /** * @return true if MO SMS should be blocked. * @return true if MO SMS should be blocked for Emergency Callback Mode. */ protected abstract boolean shouldBlockSms(); protected abstract boolean shouldBlockSmsForEcbm(); /** * Called when SMS send completes. Broadcasts a sentIntent on success. Loading src/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +3 −2 Original line number Diff line number Diff line Loading @@ -73,8 +73,9 @@ public class CdmaSMSDispatcher extends SMSDispatcher { } @Override protected boolean shouldBlockSms() { return SMSDispatcherUtil.shouldBlockSms(isCdmaMo(), mPhone); protected boolean shouldBlockSmsForEcbm() { // We only block outgoing SMS during ECBM when using CDMA. return mPhone.isInEcm() && isCdmaMo() && !isIms(); } @Override Loading src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +3 −2 Original line number Diff line number Diff line Loading @@ -106,8 +106,9 @@ public final class GsmSMSDispatcher extends SMSDispatcher { } @Override protected boolean shouldBlockSms() { return SMSDispatcherUtil.shouldBlockSms(isCdmaMo(), mPhone); protected boolean shouldBlockSmsForEcbm() { // There is no such thing as ECBM for GSM. This only applies to CDMA. return false; } @Override Loading src/java/com/android/internal/telephony/util/SMSDispatcherUtil.java +0 −11 Original line number Diff line number Diff line Loading @@ -35,17 +35,6 @@ public final class SMSDispatcherUtil { // Prevent instantiation. private SMSDispatcherUtil() {} /** * Whether to block SMS or not. * * @param isCdma true if cdma format should be used. * @param phone the Phone to use * @return true to block sms; false otherwise. */ public static boolean shouldBlockSms(boolean isCdma, Phone phone) { return isCdma && phone.isInEcm(); } /** * Trigger the proper implementation for getting submit pdu for text sms based on format. * Loading Loading
src/java/com/android/internal/telephony/ImsSmsDispatcher.java +4 −2 Original line number Diff line number Diff line Loading @@ -247,8 +247,10 @@ public class ImsSmsDispatcher extends SMSDispatcher { } @Override protected boolean shouldBlockSms() { return SMSDispatcherUtil.shouldBlockSms(isCdmaMo(), mPhone); protected boolean shouldBlockSmsForEcbm() { // We should not block outgoing SMS during ECM on IMS. It only applies to outgoing CDMA // SMS. return false; } @Override Loading
src/java/com/android/internal/telephony/SMSDispatcher.java +3 −3 Original line number Diff line number Diff line Loading @@ -628,7 +628,7 @@ public abstract class SMSDispatcher extends Handler { * Send an SMS PDU. Usually just calls {@link sendRawPdu}. */ private void sendSubmitPdu(SmsTracker tracker) { if (shouldBlockSms()) { if (shouldBlockSmsForEcbm()) { Rlog.d(TAG, "Block SMS in Emergency Callback mode"); tracker.onFailed(mContext, SmsManager.RESULT_ERROR_NO_SERVICE, 0/*errorCode*/); } else { Loading @@ -637,9 +637,9 @@ public abstract class SMSDispatcher extends Handler { } /** * @return true if MO SMS should be blocked. * @return true if MO SMS should be blocked for Emergency Callback Mode. */ protected abstract boolean shouldBlockSms(); protected abstract boolean shouldBlockSmsForEcbm(); /** * Called when SMS send completes. Broadcasts a sentIntent on success. Loading
src/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +3 −2 Original line number Diff line number Diff line Loading @@ -73,8 +73,9 @@ public class CdmaSMSDispatcher extends SMSDispatcher { } @Override protected boolean shouldBlockSms() { return SMSDispatcherUtil.shouldBlockSms(isCdmaMo(), mPhone); protected boolean shouldBlockSmsForEcbm() { // We only block outgoing SMS during ECBM when using CDMA. return mPhone.isInEcm() && isCdmaMo() && !isIms(); } @Override Loading
src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +3 −2 Original line number Diff line number Diff line Loading @@ -106,8 +106,9 @@ public final class GsmSMSDispatcher extends SMSDispatcher { } @Override protected boolean shouldBlockSms() { return SMSDispatcherUtil.shouldBlockSms(isCdmaMo(), mPhone); protected boolean shouldBlockSmsForEcbm() { // There is no such thing as ECBM for GSM. This only applies to CDMA. return false; } @Override Loading
src/java/com/android/internal/telephony/util/SMSDispatcherUtil.java +0 −11 Original line number Diff line number Diff line Loading @@ -35,17 +35,6 @@ public final class SMSDispatcherUtil { // Prevent instantiation. private SMSDispatcherUtil() {} /** * Whether to block SMS or not. * * @param isCdma true if cdma format should be used. * @param phone the Phone to use * @return true to block sms; false otherwise. */ public static boolean shouldBlockSms(boolean isCdma, Phone phone) { return isCdma && phone.isInEcm(); } /** * Trigger the proper implementation for getting submit pdu for text sms based on format. * Loading