Loading mms-common/java/com/android/mmscommon/mms/pdu/PduPersister.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1145,6 +1145,10 @@ public class PduPersister { } } } } // mark "read" and "seen" values.put(Mms.READ, 0); values.put(Mms.SEEN, 0); Uri res = SqliteWrapper.insert(mContext, mContentResolver, uri, values); Uri res = SqliteWrapper.insert(mContext, mContentResolver, uri, values); if (res == null) { if (res == null) { throw new MmsException("persist() failed: return null."); throw new MmsException("persist() failed: return null."); Loading mms-common/java/com/android/mmscommon/telephony/TelephonyProvider.java +20 −31 Original line number Original line Diff line number Diff line Loading @@ -51,37 +51,6 @@ public final class TelephonyProvider { private static final boolean DEBUG = true; private static final boolean DEBUG = true; private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV; private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV; // public static final Pattern EMAIL_ADDRESS // = Pattern.compile( // "[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}" + // "\\@" + // "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" + // "(" + // "\\." + // "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" + // ")+" // ); // // /** // * This pattern is intended for searching for things that look like they // * might be phone numbers in arbitrary text, not for validating whether // * something is in fact a phone number. It will miss many things that // * are legitimate phone numbers. // * // * <p> The pattern matches the following: // * <ul> // * <li>Optionally, a + sign followed immediately by one or more digits. Spaces, dots, or dashes // * may follow. // * <li>Optionally, sets of digits in parentheses, separated by spaces, dots, or dashes. // * <li>A string starting and ending with a digit, containing digits, spaces, dots, and/or dashes. // * </ul> // */ // public static final Pattern PHONE // = Pattern.compile( // sdd = space, dot, or dash // "(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>* // + "(\\([0-9]+\\)[\\- \\.]*)?" // (<digits>)<sdd>* // + "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit> // Constructor // Constructor public TelephonyProvider() { public TelephonyProvider() { } } Loading Loading @@ -135,6 +104,12 @@ public final class TelephonyProvider { */ */ public static final String READ = "read"; public static final String READ = "read"; /** * Indicates whether this message has been seen by the user. The "seen" flag will be * used to figure out whether we need to throw up a statusbar notification or not. */ public static final String SEEN = "seen"; /** /** * The TP-Status value for the message, or -1 if no status has * The TP-Status value for the message, or -1 if no status has * been received * been received Loading Loading @@ -705,6 +680,12 @@ public final class TelephonyProvider { */ */ public static final String READ = "read"; public static final String READ = "read"; /** * Indicates whether this message has been seen by the user. The "seen" flag will be * used to figure out whether we need to throw up a statusbar notification or not. */ public static final String SEEN = "seen"; /** /** * The Message-ID of the message. * The Message-ID of the message. * <P>Type: TEXT</P> * <P>Type: TEXT</P> Loading Loading @@ -1157,6 +1138,7 @@ public final class TelephonyProvider { * <P>Type: INTEGER</P> * <P>Type: INTEGER</P> */ */ public static final String READ = "read"; public static final String READ = "read"; /** /** * The snippet of the latest message in the thread. * The snippet of the latest message in the thread. * <P>Type: TEXT</P> * <P>Type: TEXT</P> Loading Loading @@ -1697,6 +1679,13 @@ public final class TelephonyProvider { */ */ public static final String LAST_TRY = "last_try"; public static final String LAST_TRY = "last_try"; } } public static final class WordsTable { public static final String ID = "_id"; public static final String SOURCE_ROW_ID = "source_id"; public static final String TABLE_ID = "table_to_use"; public static final String INDEXED_TEXT = "index_text"; } } } public static final class Carriers implements BaseColumns { public static final class Carriers implements BaseColumns { Loading Loading
mms-common/java/com/android/mmscommon/mms/pdu/PduPersister.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1145,6 +1145,10 @@ public class PduPersister { } } } } // mark "read" and "seen" values.put(Mms.READ, 0); values.put(Mms.SEEN, 0); Uri res = SqliteWrapper.insert(mContext, mContentResolver, uri, values); Uri res = SqliteWrapper.insert(mContext, mContentResolver, uri, values); if (res == null) { if (res == null) { throw new MmsException("persist() failed: return null."); throw new MmsException("persist() failed: return null."); Loading
mms-common/java/com/android/mmscommon/telephony/TelephonyProvider.java +20 −31 Original line number Original line Diff line number Diff line Loading @@ -51,37 +51,6 @@ public final class TelephonyProvider { private static final boolean DEBUG = true; private static final boolean DEBUG = true; private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV; private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV; // public static final Pattern EMAIL_ADDRESS // = Pattern.compile( // "[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}" + // "\\@" + // "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" + // "(" + // "\\." + // "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" + // ")+" // ); // // /** // * This pattern is intended for searching for things that look like they // * might be phone numbers in arbitrary text, not for validating whether // * something is in fact a phone number. It will miss many things that // * are legitimate phone numbers. // * // * <p> The pattern matches the following: // * <ul> // * <li>Optionally, a + sign followed immediately by one or more digits. Spaces, dots, or dashes // * may follow. // * <li>Optionally, sets of digits in parentheses, separated by spaces, dots, or dashes. // * <li>A string starting and ending with a digit, containing digits, spaces, dots, and/or dashes. // * </ul> // */ // public static final Pattern PHONE // = Pattern.compile( // sdd = space, dot, or dash // "(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>* // + "(\\([0-9]+\\)[\\- \\.]*)?" // (<digits>)<sdd>* // + "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit> // Constructor // Constructor public TelephonyProvider() { public TelephonyProvider() { } } Loading Loading @@ -135,6 +104,12 @@ public final class TelephonyProvider { */ */ public static final String READ = "read"; public static final String READ = "read"; /** * Indicates whether this message has been seen by the user. The "seen" flag will be * used to figure out whether we need to throw up a statusbar notification or not. */ public static final String SEEN = "seen"; /** /** * The TP-Status value for the message, or -1 if no status has * The TP-Status value for the message, or -1 if no status has * been received * been received Loading Loading @@ -705,6 +680,12 @@ public final class TelephonyProvider { */ */ public static final String READ = "read"; public static final String READ = "read"; /** * Indicates whether this message has been seen by the user. The "seen" flag will be * used to figure out whether we need to throw up a statusbar notification or not. */ public static final String SEEN = "seen"; /** /** * The Message-ID of the message. * The Message-ID of the message. * <P>Type: TEXT</P> * <P>Type: TEXT</P> Loading Loading @@ -1157,6 +1138,7 @@ public final class TelephonyProvider { * <P>Type: INTEGER</P> * <P>Type: INTEGER</P> */ */ public static final String READ = "read"; public static final String READ = "read"; /** /** * The snippet of the latest message in the thread. * The snippet of the latest message in the thread. * <P>Type: TEXT</P> * <P>Type: TEXT</P> Loading Loading @@ -1697,6 +1679,13 @@ public final class TelephonyProvider { */ */ public static final String LAST_TRY = "last_try"; public static final String LAST_TRY = "last_try"; } } public static final class WordsTable { public static final String ID = "_id"; public static final String SOURCE_ROW_ID = "source_id"; public static final String TABLE_ID = "table_to_use"; public static final String INDEXED_TEXT = "index_text"; } } } public static final class Carriers implements BaseColumns { public static final class Carriers implements BaseColumns { Loading