修复编译错误

hdrplus
Matthew 12 months ago
parent ea98c41353
commit fa7b710ff4

@ -577,16 +577,18 @@ public class MainActivity extends AppCompatActivity {
if (!tempFile.exists()) { if (!tempFile.exists()) {
tempFile.mkdirs(); tempFile.mkdirs();
} }
File photoFile = new File(tempFile, Integer.toString(channel) + "-img.jpg"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
Date dt = new Date();
File photoFile = new File(tempFile, "IMG-" + Integer.toString(channel) + "-" + simpleDateFormat.format(dt) + (photoOrVideo ? ".jpg" : ".mp4"));
if (photoFile.exists()) { if (photoFile.exists()) {
photoFile.delete(); photoFile.delete();
} }
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); File configFile = new File(appPath);
Date dt = new Date(); configFile = new File(configFile, "data/channels/" + Integer.toString(channel) + ".json");
String leftTopOsd = simpleDateFormat2.format(dt);
MicroPhotoService.takePhoto(channel, preset, channel - 1, (channel == 4), photoFile.getAbsolutePath(), leftTopOsd, null, null, null); MicroPhotoService.takePhoto(channel, preset, photoOrVideo, configFile.getAbsolutePath(), photoFile.getAbsolutePath());
} else { } else {
MicroPhotoService.takePhoto(this.getApplicationContext(), channel, preset, photoOrVideo); MicroPhotoService.takePhoto(this.getApplicationContext(), channel, preset, photoOrVideo);
} }

Loading…
Cancel
Save