|
|
|
@ -31,6 +31,7 @@ public class BridgeActivity extends AppCompatActivity {
|
|
|
|
|
private final static String ACTION_BATTERY_VOLTAGE = "query_bv";
|
|
|
|
|
private final static String ACTION_RECORDING = "recording";
|
|
|
|
|
private final static String ACTION_TAKE_PHOTO = "take_photo";
|
|
|
|
|
private final static String ACTION_QUERY_SEC_VERSION = "query_sec_v";
|
|
|
|
|
|
|
|
|
|
private final static int REQUEST_CODE_RECORDING = Camera2VideoActivity.REQUEST_CODE_RECORDING;
|
|
|
|
|
|
|
|
|
@ -50,7 +51,15 @@ public class BridgeActivity extends AppCompatActivity {
|
|
|
|
|
Intent intent = getIntent();
|
|
|
|
|
final String action = intent.getStringExtra("action");
|
|
|
|
|
if (!TextUtils.isEmpty(action)) {
|
|
|
|
|
if (TextUtils.equals(action, ACTION_IMP_PUBKEY)) {
|
|
|
|
|
if (TextUtils.equals(action, ACTION_QUERY_SEC_VERSION)) {
|
|
|
|
|
String resultFile = intent.getStringExtra("resultFile");
|
|
|
|
|
String version = MicroPhotoService.querySecVersion();
|
|
|
|
|
|
|
|
|
|
if (!TextUtils.isEmpty(resultFile)) {
|
|
|
|
|
FilesUtils.ensureParentDirectoryExisted(resultFile);
|
|
|
|
|
FilesUtils.writeTextFile(resultFile, version);
|
|
|
|
|
}
|
|
|
|
|
} else if (TextUtils.equals(action, ACTION_IMP_PUBKEY)) {
|
|
|
|
|
String cert = intent.getStringExtra("cert");
|
|
|
|
|
String path = intent.getStringExtra("path");
|
|
|
|
|
String resultFile = intent.getStringExtra("resultFile");
|
|
|
|
|