summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorJake Hamby <jhamby@google.com>2012-06-06 13:56:50 -0700
committerJake Hamby <jhamby@google.com>2012-06-06 13:56:50 -0700
commit004ff5ad2aa02daff607bcf1712f3efbb84c58ca (patch)
tree7634261e19f69f789ffe11bf549345390d333d5e /telephony
parent622976ba775ed2b2cebe83ec1e60e1db6db89e2a (diff)
downloadframeworks_base-004ff5ad2aa02daff607bcf1712f3efbb84c58ca.zip
frameworks_base-004ff5ad2aa02daff607bcf1712f3efbb84c58ca.tar.gz
frameworks_base-004ff5ad2aa02daff607bcf1712f3efbb84c58ca.tar.bz2
DO NOT MERGE: Remove SMS shortcode warning feature.
Fix jb-dev build. The SMS shortcode warning feature has some usability limitations which need to be resolved before shipping. Remove the code for JellyBean. It will be added back to a future release when the feature is complete. Bug: 6605549 Change-Id: Ic8a68dc0b1ad038618962185f5ee680d5281ca21
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/SMSDispatcher.java55
1 files changed, 0 insertions, 55 deletions
diff --git a/telephony/java/com/android/internal/telephony/SMSDispatcher.java b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
index 6ba8b9e..07d733e 100644
--- a/telephony/java/com/android/internal/telephony/SMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
@@ -116,12 +116,6 @@ public abstract class SMSDispatcher extends Handler {
/** Don't send SMS (user did not confirm). */
static final int EVENT_STOP_SENDING = 7; // accessed from inner class
- /** Confirmation required for third-party apps sending to an SMS short code. */
- private static final int EVENT_CONFIRM_SEND_TO_POSSIBLE_PREMIUM_SHORT_CODE = 8;
-
- /** Confirmation required for third-party apps sending to an SMS short code. */
- private static final int EVENT_CONFIRM_SEND_TO_PREMIUM_SHORT_CODE = 9;
-
protected final Phone mPhone;
protected final Context mContext;
protected final ContentResolver mResolver;
@@ -294,14 +288,6 @@ public abstract class SMSDispatcher extends Handler {
handleReachSentLimit((SmsTracker)(msg.obj));
break;
- case EVENT_CONFIRM_SEND_TO_POSSIBLE_PREMIUM_SHORT_CODE:
- handleConfirmShortCode(false, (SmsTracker)(msg.obj));
- break;
-
- case EVENT_CONFIRM_SEND_TO_PREMIUM_SHORT_CODE:
- handleConfirmShortCode(true, (SmsTracker)(msg.obj));
- break;
-
case EVENT_SEND_CONFIRMED_SMS:
{
SmsTracker tracker = (SmsTracker) msg.obj;
@@ -1000,47 +986,6 @@ public abstract class SMSDispatcher extends Handler {
}
/**
- * Post an alert for user confirmation when sending to a potential short code.
- * @param isPremium true if the destination is known to be a premium short code
- * @param tracker the SmsTracker for the current message.
- */
- protected void handleConfirmShortCode(boolean isPremium, SmsTracker tracker) {
- if (denyIfQueueLimitReached(tracker)) {
- return; // queue limit reached; error was returned to caller
- }
-
- int messageId;
- int titleId;
- if (isPremium) {
- messageId = R.string.sms_premium_short_code_confirm_message;
- titleId = R.string.sms_premium_short_code_confirm_title;
- } else {
- messageId = R.string.sms_short_code_confirm_message;
- titleId = R.string.sms_short_code_confirm_title;
- }
-
- CharSequence appLabel = getAppLabel(tracker.mAppPackage);
- Resources r = Resources.getSystem();
- Spanned messageText = Html.fromHtml(r.getString(messageId, appLabel, tracker.mDestAddress));
-
- ConfirmDialogListener listener = new ConfirmDialogListener(tracker);
-
- AlertDialog d = new AlertDialog.Builder(mContext)
- .setTitle(titleId)
- .setIcon(R.drawable.stat_sys_warning)
- .setMessage(messageText)
- .setPositiveButton(r.getString(R.string.sms_short_code_confirm_allow), listener)
- .setNegativeButton(r.getString(R.string.sms_short_code_confirm_deny), listener)
-// TODO: add third button for "Report malicious app" feature
-// .setNeutralButton(r.getString(R.string.sms_short_code_confirm_report), listener)
- .setOnCancelListener(listener)
- .create();
-
- d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
- d.show();
- }
-
- /**
* Send the message along to the radio.
*
* @param tracker holds the SMS message to send