允许和运维同时启动mpres。并增加异常处理

lowmem
Matthew 4 weeks ago
parent cf557a599a
commit c34a649fa5

@ -136,13 +136,15 @@ public class MainActivity extends AppCompatActivity {
} }
else { else {
Intent resIntent = getPackageManager().getLaunchIntentForPackage(MicroPhotoContext.PACKAGE_NAME_MPRES); Intent resIntent = getPackageManager().getLaunchIntentForPackage(MicroPhotoContext.PACKAGE_NAME_MPRES);
resIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); if (resIntent != null) {
resIntent.putExtra("initres", 1); resIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
String sn = MicroPhotoService.getSerialNumber(); resIntent.putExtra("initres", 1);
if (!TextUtils.isEmpty(sn)) { String sn = MicroPhotoService.getSerialNumber();
resIntent.putExtra("sn", sn); if (!TextUtils.isEmpty(sn)) {
resIntent.putExtra("sn", sn);
}
startActivity(resIntent);
} }
startActivity(resIntent);
} }
} }

Loading…
Cancel
Save