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

Commit 2c4daadc authored by fionaxu's avatar fionaxu Committed by android-build-merger
Browse files

Do not allow premium SMS during SuW am: d8764991 am: b6cb6ad7 am:...

Do not allow premium SMS during SuW am: d8764991 am: b6cb6ad7 am: b63de969 am: aa6025d0 am: 6ac76ba0 am: bd6080f6 am: 23e85fe0 am: 7933d601 am: cd86f722 am: 32388fe9
am: 756ccba9

Change-Id: I82d110d6bd6f3326d6fd1a87255c347c30da1383
parents 8ac1333d 756ccba9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1044,6 +1044,12 @@ public abstract class SMSDispatcher extends Handler {
                return true;    // not a premium short code
            }

            // Do not allow any premium sms during SuW
            if (Settings.Global.getInt(mResolver, Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
                Rlog.e(TAG, "Can't send premium sms during Setup Wizard");
                return false;
            }

            // Wait for user confirmation unless the user has set permission to always allow/deny
            int premiumSmsPermission = mUsageMonitor.getPremiumSmsPermission(
                    tracker.mAppInfo.packageName);