Created
June 7, 2012 22:13
-
-
Save alexjlockwood/2891954 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class AlbumStorageDirFactory { | |
/** | |
* Returns a File object that points to the folder that will store | |
* the album's pictures. | |
*/ | |
public abstract File getAlbumStorageDir(String albumName); | |
/** | |
* A static factory method that returns a new AlbumStorageDirFactory | |
* instance based on the current device's SDK version. | |
*/ | |
public static AlbumStorageDirFactory newInstance() { | |
if (CompatabilityUtil.isFroyo()) { | |
return new FroyoAlbumDirFactory(); | |
} else { | |
return new BaseAlbumDirFactory(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment