Removed game settings from crash report, not very helpful

This commit is contained in:
Yair Morgenstern
2020-01-03 15:20:38 +02:00
parent ca5cc57315
commit 9907e4429c
4 changed files with 5 additions and 8 deletions

View File

@ -9,7 +9,7 @@ class AndroidLauncher : AndroidApplication() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val config = AndroidApplicationConfiguration().apply { useImmersiveMode = true }
val game = UncivGame(BuildConfig.VERSION_NAME, UncivCrashReportSender(this))
val game = UncivGame(BuildConfig.VERSION_NAME, CrashReportSenderAndroid(this))
initialize(game, config)
}
}

View File

@ -8,7 +8,7 @@ import android.widget.Toast
import com.unciv.models.CrashReport
import com.unciv.ui.utils.CrashReportSender
class UncivCrashReportSender(private val activity: Activity) : CrashReportSender {
class CrashReportSenderAndroid(private val activity: Activity) : CrashReportSender {
companion object {
private const val EMAIL_TO = "yairm210@hotmail.com"
@ -19,8 +19,7 @@ class UncivCrashReportSender(private val activity: Activity) : CrashReportSender
"Game version: %s\n" +
"OS version: %s\n" +
"Device model: %s\n" +
"Game data: %s\n" +
"Game settings: %s"
"Game data: %s\n"
}
override fun sendReport(report: CrashReport) {
@ -42,5 +41,5 @@ class UncivCrashReportSender(private val activity: Activity) : CrashReportSender
}
private fun buildEmailBody(report: CrashReport): String =
EMAIL_BODY.format(report.version, Build.VERSION.SDK_INT, Build.MODEL, report.gameInfo, report.gameSettings)
EMAIL_BODY.format(report.version, Build.VERSION.SDK_INT, Build.MODEL, report.gameInfo)
}

View File

@ -2,6 +2,5 @@ package com.unciv.models
data class CrashReport(
val gameInfo: String,
val gameSettings: String,
val version: String
)

View File

@ -61,8 +61,7 @@ interface CrashController {
private fun buildReport(): CrashReport {
return UncivGame.Current.run {
val zippedGameInfo = Json().toJson(gameInfo).let { Gzip.zip(it) }
val zippedGameSettings = Json().toJson(settings).let { Gzip.zip(it) }
CrashReport(zippedGameInfo, zippedGameSettings, version)
CrashReport(zippedGameInfo, version)
}
}
}