|
|
|
@ -95,6 +95,11 @@ public class BridgeActivity extends AppCompatActivity {
|
|
|
|
|
boolean usb = intent.getBooleanExtra("usb", false);
|
|
|
|
|
int cameraId = intent.getIntExtra("cameraId", -1);
|
|
|
|
|
|
|
|
|
|
String leftTopOsd = intent.getStringExtra("leftTopOsd");
|
|
|
|
|
String rightTopOsd = intent.getStringExtra("rightTopOsd");
|
|
|
|
|
String rightBottomOsd = intent.getStringExtra("rightBottomOsd");
|
|
|
|
|
String leftBottomOsd = intent.getStringExtra("leftBottomOsd");
|
|
|
|
|
|
|
|
|
|
File file = new File(path);
|
|
|
|
|
if (file.exists()) {
|
|
|
|
|
file.delete();
|
|
|
|
@ -102,7 +107,7 @@ public class BridgeActivity extends AppCompatActivity {
|
|
|
|
|
FileUtils.ensureParentDirectoryExisted(path);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MicroPhotoService.takePhoto(channel, preset, cameraId, usb, path);
|
|
|
|
|
MicroPhotoService.takePhoto(channel, preset, cameraId, usb, path, leftTopOsd, rightTopOsd, rightBottomOsd, leftBottomOsd);
|
|
|
|
|
|
|
|
|
|
} else if (TextUtils.equals(action, ACTION_RECORDING)) {
|
|
|
|
|
String path = intent.getStringExtra("path");
|
|
|
|
@ -136,13 +141,15 @@ public class BridgeActivity extends AppCompatActivity {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final Activity activity = this;
|
|
|
|
|
mHandler.postDelayed(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
activity.finish();
|
|
|
|
|
}
|
|
|
|
|
}, 2000);
|
|
|
|
|
if (mAutoClose) {
|
|
|
|
|
final Activity activity = this;
|
|
|
|
|
mHandler.postDelayed(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
activity.finish();
|
|
|
|
|
}
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -159,7 +166,7 @@ public class BridgeActivity extends AppCompatActivity {
|
|
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
|
|
|
|
|
|
|
if (requestCode == REQUEST_CODE_RECORDING) {
|
|
|
|
|
if (mVideoFilePath != null) {
|
|
|
|
|
if (mVideoFilePath != null && data != null) {
|
|
|
|
|
String path = data.getStringExtra("path");
|
|
|
|
|
if (path != null) {
|
|
|
|
|
File file = new File(path);
|
|
|
|
|