Loading src/java/com/android/internal/telephony/SMSDispatcher.java +56 −50 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import static android.Manifest.permission.SEND_SMS_NO_CONFIRMATION; import static android.telephony.SmsManager.RESULT_ERROR_FDN_CHECK_FAILURE; import static android.telephony.SmsManager.RESULT_ERROR_GENERIC_FAILURE; import static android.telephony.SmsManager.RESULT_ERROR_LIMIT_EXCEEDED; Loading Loading @@ -1011,6 +1012,10 @@ public abstract class SMSDispatcher extends Handler { * @return true if the destination is approved; false if user confirmation event was sent */ boolean checkDestination(SmsTracker tracker) { if (mContext.checkCallingOrSelfPermission(SEND_SMS_NO_CONFIRMATION) == PackageManager.PERMISSION_GRANTED) { return true; // app is pre-approved to send to short codes } else { int rule = mPremiumSmsRule.get(); int smsCategory = SmsUsageMonitor.CATEGORY_NOT_SHORT_CODE; if (rule == PREMIUM_RULE_USE_SIM || rule == PREMIUM_RULE_USE_BOTH) { Loading Loading @@ -1069,6 +1074,7 @@ public abstract class SMSDispatcher extends Handler { return false; // wait for user confirmation } } } /** * Deny sending an SMS if the outgoing queue limit is reached. Used when the message Loading Loading
src/java/com/android/internal/telephony/SMSDispatcher.java +56 −50 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import static android.Manifest.permission.SEND_SMS_NO_CONFIRMATION; import static android.telephony.SmsManager.RESULT_ERROR_FDN_CHECK_FAILURE; import static android.telephony.SmsManager.RESULT_ERROR_GENERIC_FAILURE; import static android.telephony.SmsManager.RESULT_ERROR_LIMIT_EXCEEDED; Loading Loading @@ -1011,6 +1012,10 @@ public abstract class SMSDispatcher extends Handler { * @return true if the destination is approved; false if user confirmation event was sent */ boolean checkDestination(SmsTracker tracker) { if (mContext.checkCallingOrSelfPermission(SEND_SMS_NO_CONFIRMATION) == PackageManager.PERMISSION_GRANTED) { return true; // app is pre-approved to send to short codes } else { int rule = mPremiumSmsRule.get(); int smsCategory = SmsUsageMonitor.CATEGORY_NOT_SHORT_CODE; if (rule == PREMIUM_RULE_USE_SIM || rule == PREMIUM_RULE_USE_BOTH) { Loading Loading @@ -1069,6 +1074,7 @@ public abstract class SMSDispatcher extends Handler { return false; // wait for user confirmation } } } /** * Deny sending an SMS if the outgoing queue limit is reached. Used when the message Loading