|
|
@ -38,6 +38,7 @@ public class CertActivity extends AppCompatActivity {
|
|
|
|
private static long AUTO_CLOSE_TIMEOUT = 200;
|
|
|
|
private static long AUTO_CLOSE_TIMEOUT = 200;
|
|
|
|
|
|
|
|
|
|
|
|
private Handler mHandler = null;
|
|
|
|
private Handler mHandler = null;
|
|
|
|
|
|
|
|
TextView mTextView = null;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@ -60,19 +61,18 @@ public class CertActivity extends AppCompatActivity {
|
|
|
|
|
|
|
|
|
|
|
|
String version = MicroPhotoService.querySecVersion();
|
|
|
|
String version = MicroPhotoService.querySecVersion();
|
|
|
|
|
|
|
|
|
|
|
|
TextView textView = (TextView)findViewById(R.id.textView);
|
|
|
|
mTextView = (TextView)findViewById(R.id.textView);
|
|
|
|
textView.setText(R.string.nrsec_version + version);
|
|
|
|
mTextView.setText(R.string.nrsec_version + version);
|
|
|
|
|
|
|
|
|
|
|
|
ActionBar actionBar = getSupportActionBar();
|
|
|
|
ActionBar actionBar = getSupportActionBar();
|
|
|
|
String text = getResources().getString(R.string.nrsec_version);
|
|
|
|
String text = getResources().getString(R.string.nrsec_version);
|
|
|
|
actionBar.setTitle(actionBar.getTitle().toString() + " " + text + " " + version);
|
|
|
|
actionBar.setTitle(actionBar.getTitle().toString() + " " + text + " " + version);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
|
Date dt = new Date();
|
|
|
|
Date dt = new Date();
|
|
|
|
text = format.format(dt);
|
|
|
|
text = format.format(dt);
|
|
|
|
|
|
|
|
|
|
|
|
((TextView) findViewById(R.id.textView)).setText(text);
|
|
|
|
mTextView.setText(text);
|
|
|
|
|
|
|
|
|
|
|
|
mHandler = new Handler();
|
|
|
|
mHandler = new Handler();
|
|
|
|
|
|
|
|
|
|
|
@ -338,13 +338,29 @@ public class CertActivity extends AppCompatActivity {
|
|
|
|
f = new File(path);
|
|
|
|
f = new File(path);
|
|
|
|
f = new File(f, "progress.txt");
|
|
|
|
f = new File(f, "progress.txt");
|
|
|
|
writeTextFile(f.getAbsolutePath(), Integer.toString(idx - startIdx + 1));
|
|
|
|
writeTextFile(f.getAbsolutePath(), Integer.toString(idx - startIdx + 1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final String fullSn = sn + idxStr;
|
|
|
|
|
|
|
|
mHandler.post(new Runnable() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void run() {
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
|
|
|
|
|
|
|
|
Date dt = new Date();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mTextView.setText(format.format(dt) + " " + fullSn);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
f = new File(path);
|
|
|
|
f = new File(path);
|
|
|
|
f = new File(f, "log.txt");
|
|
|
|
File dest = new File(f, "log.txt");
|
|
|
|
|
|
|
|
f = new File(f, "log");
|
|
|
|
writeTextFile(f.getAbsolutePath(), logs.toString());
|
|
|
|
writeTextFile(f.getAbsolutePath(), logs.toString());
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
Files.move(f.toPath(), dest.toPath());
|
|
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
final Activity activity = this;
|
|
|
|
final Activity activity = this;
|
|
|
|
mHandler.postDelayed(new Runnable() {
|
|
|
|
mHandler.postDelayed(new Runnable() {
|
|
|
|