改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;