Do not allow premium SMS during SuW

Bug: 29420123
Change-Id: I41ef7138635f11fbe7f495dd81103458cb969c35
(cherry picked from commit 15f55ca2f204e664807e047b5f898693b274bab6)
diff --git a/src/java/com/android/internal/telephony/SMSDispatcher.java b/src/java/com/android/internal/telephony/SMSDispatcher.java
index 8fe48ba..b197588 100644
--- a/src/java/com/android/internal/telephony/SMSDispatcher.java
+++ b/src/java/com/android/internal/telephony/SMSDispatcher.java
@@ -756,6 +756,12 @@
                 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);