Esempio n. 1
0
 @Deprecated
 public static Album recoverAlbum(Context context) throws IOException {
   if (!storageReady()) {
     throw new IOException("Storage is not available");
   }
   File path = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES);
   File file = new File(path, ALBUM_FILE);
   if (file.exists()) {
     Album album = getAlbumFromFile(file);
     return album;
   } else {
     Album album = Album.getNewAlbum();
     saveAlbumToFile(album, file);
     return album;
   }
 }