Fix assert fail during onSaveInstanceState()

Selected attachment from GalleryGridView will be destroyed when same
attachment is already existed in DraftMessageData. It will make assert
fail during onSaveInstanceState() because mDestroyed in MessagePartData
is true already.
It destroys existing attachment and replaces with new attachment instead
so that selected attachments could be maintained correctly.

Test: 1) Select one image in GalleryMediaChooser.
      2) Reopen the chooser and long-press same image again to enter to
      the multi-selection mode.
      3) Long-press the attachment on draft message to open
      AttachmentChooser.
      4) Check Assert fail.

Change-Id: I029d778779260d0097ce30bf5338fceba05e1f77
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
1 file changed