mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-13 09:26:52 -04:00
Merge pull request #2440 from s-ayush2903/fix/s-ayush2903/#2258-DiagnosticReport-Integrity-is-not-Secured
fix: Appended Device Details in the logs file as well
This commit is contained in:
commit
a3346c7d0f
@ -84,6 +84,7 @@ open class ErrorActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun emailIntent(): Intent {
|
private fun emailIntent(): Intent {
|
||||||
|
val emailBody = buildBody()
|
||||||
return Intent(Intent.ACTION_SEND).apply {
|
return Intent(Intent.ACTION_SEND).apply {
|
||||||
type = "vnd.android.cursor.dir/email"
|
type = "vnd.android.cursor.dir/email"
|
||||||
putExtra(
|
putExtra(
|
||||||
@ -91,9 +92,10 @@ open class ErrorActivity : BaseActivity() {
|
|||||||
arrayOf("android-crash-feedback@kiwix.org")
|
arrayOf("android-crash-feedback@kiwix.org")
|
||||||
)
|
)
|
||||||
putExtra(Intent.EXTRA_SUBJECT, subject)
|
putExtra(Intent.EXTRA_SUBJECT, subject)
|
||||||
putExtra(Intent.EXTRA_TEXT, buildBody())
|
putExtra(Intent.EXTRA_TEXT, emailBody)
|
||||||
if (allowLogs.isChecked) {
|
if (allowLogs.isChecked) {
|
||||||
val file = fileLogger.writeLogFile(this@ErrorActivity)
|
val file = fileLogger.writeLogFile(this@ErrorActivity)
|
||||||
|
file.appendText(emailBody)
|
||||||
val path =
|
val path =
|
||||||
FileProvider.getUriForFile(
|
FileProvider.getUriForFile(
|
||||||
this@ErrorActivity,
|
this@ErrorActivity,
|
||||||
@ -114,6 +116,7 @@ open class ErrorActivity : BaseActivity() {
|
|||||||
${if (allowLanguage.isChecked) languageLocale() else ""}
|
${if (allowLanguage.isChecked) languageLocale() else ""}
|
||||||
${if (allowDeviceDetails.isChecked) deviceDetails() else ""}
|
${if (allowDeviceDetails.isChecked) deviceDetails() else ""}
|
||||||
${if (allowFileSystemDetails.isChecked) systemDetails() else ""}
|
${if (allowFileSystemDetails.isChecked) systemDetails() else ""}
|
||||||
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
private fun exceptionDetails(): String =
|
private fun exceptionDetails(): String =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user