Merge pull request #14 from willshen/master

Modified createCaptureFile in CameraLauncher to Improve Encoding Type Safety
This commit is contained in:
macdonst 2011-11-22 17:24:51 -08:00
commit 119f6cca85

View File

@ -180,8 +180,10 @@ public class CameraLauncher extends Plugin {
File photo = null;
if (encodingType == JPEG) {
photo = new File(DirectoryManager.getTempDirectoryPath(ctx), "Pic.jpg");
} else {
} else if (encodingType == PNG) {
photo = new File(DirectoryManager.getTempDirectoryPath(ctx), "Pic.png");
} else {
throw new IllegalArgumentException("Invalid Encoding Type: " + encodingType);
}
return photo;
}