1.在MmsCofig.java文件中添加
private static int mSmsToMmsTextThreshold = N;
public static int getSmsToMmsTextThreshold() {
return mSmsToMmsTextThreshold;
}
并在loadMmsSettings(Context context)方法的else if ("int".equals(tag))分支中添加
else if ("smsToMmsTextThreshold".equalsIgnoreCase(value)) {
mSmsToMmsTextThreshold = Integer.parseInt(text);
}
2. 在MmsConfig.xml文件中新增 // sergeycao
<!-- Maximum number of SMS message segments in a long text message before converting
the SMS message to an MMS message. -->
<int name="smsToMmsTextThreshold">N</int>
3.在WorkingMessage.java中添加方法
public void setLengthRequiresMms(boolean mmsRequired) {
updateState(LENGTH_REQUIRES_MMS, mmsRequired, true);
}
4. 在ComposeMessageActivity.java文件的updateCounter(CharSequence text, int start, int
before, int count)方法中添加:
// Force send as MMS once the number of SMSes required reaches a configurable
threshold.
mWorkingMessage.setLengthRequiresMms(msgCount >=MmsConfig.getSmsToMmsTextThreshold());
private static int mSmsToMmsTextThreshold = N;
public static int getSmsToMmsTextThreshold() {
return mSmsToMmsTextThreshold;
}
并在loadMmsSettings(Context context)方法的else if ("int".equals(tag))分支中添加
else if ("smsToMmsTextThreshold".equalsIgnoreCase(value)) {
mSmsToMmsTextThreshold = Integer.parseInt(text);
}
2. 在MmsConfig.xml文件中新增 // sergeycao
<!-- Maximum number of SMS message segments in a long text message before converting
the SMS message to an MMS message. -->
<int name="smsToMmsTextThreshold">N</int>
3.在WorkingMessage.java中添加方法
public void setLengthRequiresMms(boolean mmsRequired) {
updateState(LENGTH_REQUIRES_MMS, mmsRequired, true);
}
4. 在ComposeMessageActivity.java文件的updateCounter(CharSequence text, int start, int
before, int count)方法中添加:
// Force send as MMS once the number of SMSes required reaches a configurable
threshold.
mWorkingMessage.setLengthRequiresMms(msgCount >=MmsConfig.getSmsToMmsTextThreshold());