private static boolean albumShouldOpenInFilmstrip(MediaSet album) { int itemCount = album.getMediaItemCount(); ArrayList<MediaItem> list = (itemCount == 1) ? album.getMediaItem(0, 1) : null; // open in film strip only if there's one item in the album and the item exists return (list != null && !list.isEmpty()); }