예제 #1
0
 private void applyAuthorInfoToOthers() {
   mSaveResult = ImageXmlWriter.RESULT_NONE;
   boolean updateStatus = false;
   boolean updateApplyToOthers = false;
   synchronized (mSelectedBitmaps) {
     SelectedBitmap current = getCurrentBitmap();
     if (current == null) {
       return;
     }
     ImageAuthor author = current.mBuilder.getAuthor();
     if (author == null) {
       return; // should not be clickable if there is not an author for current
     }
     if (mApplyToOthersStateRemoveConnection) {
       ImageAuthor copy =
           new ImageAuthor(
               author.getName(),
               author.getSource(),
               author.getLicense(),
               author.getTitle(),
               author.getExtras());
       current.mBuilder.setAuthor(copy);
       updateApplyToOthers = true;
     } else {
       for (SelectedBitmap curr : mSelectedBitmaps) {
         if (curr.mBuilder.getAuthor() == null) {
           curr.mBuilder.setAuthor(author);
           updateApplyToOthers = true;
           if (curr.checkedBuild()) {
             updateStatus = true;
           }
         }
       }
     }
     if (updateApplyToOthers) {
       updateApplyToOthersButton(current);
     }
   }
   if (updateStatus) {
     updateStatus();
   }
 }