|
|
|
@ -497,7 +497,7 @@ public class Camera2RawFragment extends Fragment
|
|
|
|
|
String currentDateTime = generateTimestamp();
|
|
|
|
|
File jpegFile = new File(Environment.
|
|
|
|
|
getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM),
|
|
|
|
|
"IMG_" + currentDateTime + ".jpg");
|
|
|
|
|
"Camera/IMG_" + currentDateTime + ".jpg");
|
|
|
|
|
|
|
|
|
|
// Look up the ImageSaverBuilder for this request and update it with the file name
|
|
|
|
|
// based on the capture start time.
|
|
|
|
@ -524,7 +524,7 @@ public class Camera2RawFragment extends Fragment
|
|
|
|
|
|
|
|
|
|
if (jpegBuilder != null) {
|
|
|
|
|
jpegBuilder.setResult(result);
|
|
|
|
|
sb.append("Saving JPEG as: ");
|
|
|
|
|
sb.append("保存于: ");
|
|
|
|
|
sb.append(jpegBuilder.getSaveLocation());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -714,7 +714,7 @@ public class Camera2RawFragment extends Fragment
|
|
|
|
|
|
|
|
|
|
// For still image captures, we use the largest available size.
|
|
|
|
|
Size[] resolutions = map.getHighResolutionOutputSizes(ImageFormat.JPEG);
|
|
|
|
|
if (resolutions == null) {
|
|
|
|
|
if (resolutions == null || resolutions.length == 0) {
|
|
|
|
|
resolutions = map.getOutputSizes(ImageFormat.JPEG);
|
|
|
|
|
}
|
|
|
|
|
Size largestJpeg = Collections.max(Arrays.asList(resolutions), new CompareSizesByArea());
|
|
|
|
@ -1028,7 +1028,7 @@ public class Camera2RawFragment extends Fragment
|
|
|
|
|
|
|
|
|
|
// For still image captures, we always use the largest available size.
|
|
|
|
|
Size[] resolutions = map.getHighResolutionOutputSizes(ImageFormat.JPEG);
|
|
|
|
|
if (resolutions == null) {
|
|
|
|
|
if (resolutions == null || resolutions.length == 0) {
|
|
|
|
|
resolutions = map.getOutputSizes(ImageFormat.JPEG);
|
|
|
|
|
}
|
|
|
|
|
Size largestJpeg = Collections.max(Arrays.asList(resolutions), new CompareSizesByArea());
|
|
|
|
|