Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46125b65 authored by Amit Mahajan's avatar Amit Mahajan Committed by Android Partner Code Review
Browse files

Merge "Get rid of code to allow bypassing short-code confirmation dialog." into mm-wireless-dev

parents e018fd6d d1e1ef20
Loading
Loading
Loading
Loading
+50 −59
Original line number Diff line number Diff line
@@ -87,10 +87,6 @@ public abstract class SMSDispatcher extends Handler {
    static final boolean DBG = false;
    private static final String SEND_NEXT_MSG_EXTRA = "SendNextMsg";

    /** Permission required to send SMS to short codes without user confirmation. */
    private static final String SEND_RESPOND_VIA_MESSAGE_PERMISSION =
            "android.permission.SEND_RESPOND_VIA_MESSAGE";

    private static final int PREMIUM_RULE_USE_SIM = 1;
    private static final int PREMIUM_RULE_USE_NETWORK = 2;
    private static final int PREMIUM_RULE_USE_BOTH = 3;
@@ -1011,10 +1007,6 @@ 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_RESPOND_VIA_MESSAGE_PERMISSION)
                == 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) {
@@ -1073,7 +1065,6 @@ 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