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

Commit 1cddbc0f authored by emancebo's avatar emancebo Committed by Ed Mancebo
Browse files

Telephony: fallback to xml resources for sms shortcode recognition

Change-Id: Ie0cef484ed6e84593333e75b35abb5eb87793af7
parent 3e0ad98e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ import java.util.regex.Pattern;
 */
public class SmsUsageMonitor {
    private static final String TAG = "SmsUsageMonitor";
    private static final boolean DBG = false;
    private static final boolean DBG = true; // intentionally enable DBG
    private static final boolean VDBG = false;

    private static final String SHORT_CODE_PATH = "/data/misc/sms/codes";
@@ -447,7 +447,10 @@ public class SmsUsageMonitor {
                    if (mPatternFile.exists()) {
                        if (DBG) Rlog.d(TAG, "Loading SMS Short Code patterns from file");
                        mCurrentPatternMatcher = getPatternMatcherFromFile(countryIso);
                    } else {
                    }

                    // if matcher not defined in file, fall back to xml
                    if (mCurrentPatternMatcher == null) {
                        if (DBG) Rlog.d(TAG, "Loading SMS Short Code patterns from resource");
                        mCurrentPatternMatcher = getPatternMatcherFromResource(countryIso);
                    }