@@ -81,12 +81,6 @@ public class SmsUsageMonitor {
8181 private final HashMap <String , ArrayList <Long >> mSmsStamp =
8282 new HashMap <String , ArrayList <Long >>();
8383
84- /**
85- * Hash of package names that are allowed to send to short codes.
86- * TODO: persist this across reboots.
87- */
88- private final HashSet <String > mApprovedShortCodeSenders = new HashSet <String >();
89-
9084 /** Context for retrieving regexes from XML resource. */
9185 private final Context mContext ;
9286
@@ -248,9 +242,6 @@ public SmsUsageMonitor(Context context) {
248242 DEFAULT_SMS_CHECK_PERIOD );
249243
250244 mSettingsObserverHandler = new SettingsObserverHandler ();
251-
252- // system MMS app is always allowed to send to short codes
253- mApprovedShortCodeSenders .add ("com.android.mms" );
254245 }
255246
256247 /**
@@ -357,28 +348,6 @@ public boolean check(String appName, int smsWaiting) {
357348 }
358349 }
359350
360- /**
361- * Return whether the app is approved to send to any short code.
362- * @param appName the package name of the app requesting to send an SMS
363- * @return true if the app is approved; false if we need to confirm short code destinations
364- */
365- public boolean isApprovedShortCodeSender (String appName ) {
366- synchronized (mApprovedShortCodeSenders ) {
367- return mApprovedShortCodeSenders .contains (appName );
368- }
369- }
370-
371- /**
372- * Add app package name to the list of approved short code senders.
373- * @param appName the package name of the app to add
374- */
375- public void addApprovedShortCodeSender (String appName ) {
376- if (DBG ) log ("Adding " + appName + " to list of approved short code senders." );
377- synchronized (mApprovedShortCodeSenders ) {
378- mApprovedShortCodeSenders .add (appName );
379- }
380- }
381-
382351 /**
383352 * Check if the destination is a possible premium short code.
384353 * NOTE: the caller is expected to strip non-digits from the destination number with
0 commit comments