Fix ConcurrentModificationException
ConcurrentModificationException could be happened during iterating if parts are added newly. Test: Select several images on Gallery app and attach them to a message via Sharing Signed-off-by: Taesu Lee <taesu82.lee@samsung.com> Change-Id: Idb96239ef2c05a08fc0727797b97739aa89f12a4
This commit is contained in:
@@ -72,6 +72,7 @@ import com.android.messaging.util.SafeAsyncTask;
|
|||||||
import com.android.messaging.util.UiUtils;
|
import com.android.messaging.util.UiUtils;
|
||||||
import com.android.messaging.util.UriUtil;
|
import com.android.messaging.util.UriUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -683,7 +684,8 @@ public class ComposeMessageView extends LinearLayout
|
|||||||
final boolean hasWorkingDraft = hasMessageText || hasSubject ||
|
final boolean hasWorkingDraft = hasMessageText || hasSubject ||
|
||||||
mBinding.getData().hasAttachments();
|
mBinding.getData().hasAttachments();
|
||||||
|
|
||||||
final List<MessagePartData> attachments = draftMessageData.getReadOnlyAttachments();
|
final List<MessagePartData> attachments =
|
||||||
|
new ArrayList<MessagePartData>(draftMessageData.getReadOnlyAttachments());
|
||||||
if (draftMessageData.getIsMms()) { // MMS case
|
if (draftMessageData.getIsMms()) { // MMS case
|
||||||
if (draftMessageData.hasAttachments()) {
|
if (draftMessageData.hasAttachments()) {
|
||||||
if (hasAttachmentsChanged) {
|
if (hasAttachmentsChanged) {
|
||||||
|
|||||||
Reference in New Issue
Block a user