예제 #1
0
 private static MediaItem loadOrUpdateItem(
     Path path, Cursor cursor, DataManager dataManager, GalleryApp app, boolean isImage) {
   synchronized (DataManager.LOCK) {
     LocalMediaItem item = (LocalMediaItem) dataManager.peekMediaObject(path);
     if (item == null) {
       if (isImage) {
         item = new LocalImage(path, app, cursor);
       } else {
         //                    item = new LocalVideo(path, app, cursor);
       }
     } else {
       item.updateContent(cursor);
     }
     return item;
   }
 }