String datetime = simpleDateFormat.format(new Date());
<BUG>File file = new File(dir.getAbsolutePath(), "IMG-" + datetime + ".jpg");
</BUG>
while (file.exists()) {
datetime = simpleDateFormat.format(new Date());
<BUG>file = new File(dir.getAbsolutePath(), "IMG-" + datetime + ".jpg");
</BUG>
}
<BUG>return file;
}</BUG>
private String getApplicationName(Context context) {

String datetime = simpleDateFormat.format(new Date());
File file = new File(dir.getAbsolutePath(), "IMG-" + datetime + extension);
while (file.exists()) {
datetime = simpleDateFormat.format(new Date());
file = new File(dir.getAbsolutePath(), "IMG-" + datetime + extension);
}
return file;
}
File getPrivateFile(String filename) {
File dir = new File(targetUi.getContext().getFilesDir(), Constants.SUBDIR);
dir.mkdirs();
return new File(dir, filename);
}
private String getApplicationName(Context context) {
