diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 07226da19f..c62a9f553b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -29,12 +29,13 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
-
-
-
-
-
-
+
+
{
-// if (zipFile != null) {
-// zipFile!!.delete()
-// zipFile = null
-// }
-// }
+ Constant.REQUEST_CODE_SEND_EMAIL -> {
+ if (zipFile != null) {
+ zipFile!!.delete()
+ zipFile = null
+ }
+ }
Constant.REQUEST_CODE_ENTER_PIN_ACTIVITY -> {
if (resultCode == Activity.RESULT_OK && lastTag != null)
onTagDiscovered(lastTag!!)
@@ -275,22 +280,22 @@ class MainFragment : Fragment(), NfcAdapter.ReaderCallback, CardProtocol.Notific
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.sendLogs -> {
-// var f: File? = null
-// try {
-// f = Logger.collectLogs(this)
-// if (f != null) {
-// LOG.e(TAG, String.format("Collect %d log bytes", f.length()))
-// CommonUtil.sendEmail(this, zipFile, TAG, "Logs", UtilHelper.getDeviceInfo(), arrayOf(f))
-// } else {
-// LOG.e(TAG, "Can't create temporarily log file")
-// }
-// } catch (e: Exception) {
-// e.printStackTrace()
-// } finally {
-// if (f != null && f.exists())
-// f.delete()
-// }
-// return true
+ var f: File? = null
+ try {
+ f = Logger.collectLogs(activity)
+ if (f != null) {
+ LOG.e(TAG, String.format("Collect %d log bytes", f.length()))
+ CommonUtil.sendEmail(activity, zipFile, TAG, "Logs", UtilHelper.getDeviceInfo(), arrayOf(f))
+ } else {
+ LOG.e(TAG, "Can't create temporarily log file")
+ }
+ } catch (e: Exception) {
+ e.printStackTrace()
+ } finally {
+ if (f != null && f.exists())
+ f.delete()
+ }
+ return true
}
R.id.managePIN -> {
(activity as MainActivity).navigator.showPinSave(activity!!, false)