改MmsAttachmentEnhanceImpl.java文件,改成与Op01MmsAttachmentEnhanceExt.java的内容一致就可以实现。
public boolean isSupportAttachmentEnhance() {
return true; //改为返回true
}
public void setAttachmentName(TextView text, int size) {
if (size > 1) {
text.setText(getString(R.string.multi_files)); //folder模式下多个外部附件的字符串显示,这个字符串需要自己定义
}
}
public void setSaveAttachIntent(Intent i, int smode) {
if (smode == MMS_SAVE_OTHER_ATTACHMENT ||
smode == MMS_SAVE_ALL_ATTACHMENT) {
Bundle data = new Bundle();
data.putInt(MMS_SAVE_MODE,smode);
i.putExtras(data);
}
}
//get save attachment mode through intent
public int getSaveAttachMode(Intent i) {
int smode = -1;
Bundle data = i.getExtras();
if (data != null) {
smode = data.getInt(MMS_SAVE_MODE);
}
return smode;
}
KK2及之后版本:
修改DefaultMmsAttachmentEnhanceExt.java 这个文件,改成与Op01MmsAttachmentEnhanceExt.java的内容一致。
还要在DefaultMmsFeatureManagerExt.java的isFeatureEnabled方法内添加
case MMS_ATTACH_ENHANCE:
return true;