@@ -116,12 +116,6 @@ public abstract class SMSDispatcher extends Handler {
116116 /** Don't send SMS (user did not confirm). */
117117 static final int EVENT_STOP_SENDING = 7 ; // accessed from inner class
118118
119- /** Confirmation required for third-party apps sending to an SMS short code. */
120- private static final int EVENT_CONFIRM_SEND_TO_POSSIBLE_PREMIUM_SHORT_CODE = 8 ;
121-
122- /** Confirmation required for third-party apps sending to an SMS short code. */
123- private static final int EVENT_CONFIRM_SEND_TO_PREMIUM_SHORT_CODE = 9 ;
124-
125119 protected final Phone mPhone ;
126120 protected final Context mContext ;
127121 protected final ContentResolver mResolver ;
@@ -294,14 +288,6 @@ public void handleMessage(Message msg) {
294288 handleReachSentLimit ((SmsTracker )(msg .obj ));
295289 break ;
296290
297- case EVENT_CONFIRM_SEND_TO_POSSIBLE_PREMIUM_SHORT_CODE :
298- handleConfirmShortCode (false , (SmsTracker )(msg .obj ));
299- break ;
300-
301- case EVENT_CONFIRM_SEND_TO_PREMIUM_SHORT_CODE :
302- handleConfirmShortCode (true , (SmsTracker )(msg .obj ));
303- break ;
304-
305291 case EVENT_SEND_CONFIRMED_SMS :
306292 {
307293 SmsTracker tracker = (SmsTracker ) msg .obj ;
@@ -999,47 +985,6 @@ protected void handleReachSentLimit(SmsTracker tracker) {
999985 d .show ();
1000986 }
1001987
1002- /**
1003- * Post an alert for user confirmation when sending to a potential short code.
1004- * @param isPremium true if the destination is known to be a premium short code
1005- * @param tracker the SmsTracker for the current message.
1006- */
1007- protected void handleConfirmShortCode (boolean isPremium , SmsTracker tracker ) {
1008- if (denyIfQueueLimitReached (tracker )) {
1009- return ; // queue limit reached; error was returned to caller
1010- }
1011-
1012- int messageId ;
1013- int titleId ;
1014- if (isPremium ) {
1015- messageId = R .string .sms_premium_short_code_confirm_message ;
1016- titleId = R .string .sms_premium_short_code_confirm_title ;
1017- } else {
1018- messageId = R .string .sms_short_code_confirm_message ;
1019- titleId = R .string .sms_short_code_confirm_title ;
1020- }
1021-
1022- CharSequence appLabel = getAppLabel (tracker .mAppPackage );
1023- Resources r = Resources .getSystem ();
1024- Spanned messageText = Html .fromHtml (r .getString (messageId , appLabel , tracker .mDestAddress ));
1025-
1026- ConfirmDialogListener listener = new ConfirmDialogListener (tracker );
1027-
1028- AlertDialog d = new AlertDialog .Builder (mContext )
1029- .setTitle (titleId )
1030- .setIcon (R .drawable .stat_sys_warning )
1031- .setMessage (messageText )
1032- .setPositiveButton (r .getString (R .string .sms_short_code_confirm_allow ), listener )
1033- .setNegativeButton (r .getString (R .string .sms_short_code_confirm_deny ), listener )
1034- // TODO: add third button for "Report malicious app" feature
1035- // .setNeutralButton(r.getString(R.string.sms_short_code_confirm_report), listener)
1036- .setOnCancelListener (listener )
1037- .create ();
1038-
1039- d .getWindow ().setType (WindowManager .LayoutParams .TYPE_SYSTEM_ALERT );
1040- d .show ();
1041- }
1042-
1043988 /**
1044989 * Send the message along to the radio.
1045990 *
0 commit comments