修改拍照的临时目录

TempBranch
Matthew 9 months ago
parent 43c6fe8ec1
commit 0c7fa1ab70

@ -638,6 +638,10 @@ public class MicroPhotoService extends Service {
intent.putExtra("rightBottomOsd", rightBottomOsd); intent.putExtra("rightBottomOsd", rightBottomOsd);
intent.putExtra("leftBottomOsd", leftBottomOsd); intent.putExtra("leftBottomOsd", leftBottomOsd);
String tmpPath = MicroPhotoContext.buildMpAppDir(context);
tmpPath += "tmp";
intent.putExtra("cameraTmpPath", tmpPath);
if (photoOrVideo) { if (photoOrVideo) {
intent.putExtra("burstCaptures", 8); intent.putExtra("burstCaptures", 8);
} }

@ -275,6 +275,8 @@ public class RawActivity extends AppCompatActivity {
private boolean mFrontCamera = false; private boolean mFrontCamera = false;
private String mCameraTmpPath = null;
private int mBurstCaptures = 1; private int mBurstCaptures = 1;
private List<String> mPathsOfCapture = new ArrayList<>(); private List<String> mPathsOfCapture = new ArrayList<>();
private Set<Integer> mRequestIds = new HashSet<>(); private Set<Integer> mRequestIds = new HashSet<>();
@ -542,9 +544,9 @@ public class RawActivity extends AppCompatActivity {
String currentDateTime = generateTimestamp(); String currentDateTime = generateTimestamp();
int requestId = (int) request.getTag(); int requestId = (int) request.getTag();
File rawFile = new File(Environment. File rawFile = new File(TextUtils.isEmpty(mCameraTmpPath) ? Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) : new File(mCameraTmpPath),
getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), "RAW_" + currentDateTime + "_" + requestId + ".dng");
"RAW_" + currentDateTime + "_" + requestId + ".dng");
/* /*
File jpegFile = new File(Environment. File jpegFile = new File(Environment.
getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM),
@ -681,6 +683,7 @@ public class RawActivity extends AppCompatActivity {
mCameraId = Integer.toString(intent.getIntExtra("cameraId", 0)); mCameraId = Integer.toString(intent.getIntExtra("cameraId", 0));
mOrientation = intent.getIntExtra("orientation", -1); mOrientation = intent.getIntExtra("orientation", -1);
mCameraTmpPath = intent.getStringExtra("cameraTmpPath");
int width = intent.getIntExtra("width", MAX_PREVIEW_WIDTH); int width = intent.getIntExtra("width", MAX_PREVIEW_WIDTH);
int height = intent.getIntExtra("height", MAX_PREVIEW_HEIGHT); int height = intent.getIntExtra("height", MAX_PREVIEW_HEIGHT);

Loading…
Cancel
Save