Skip to content
Snippets Groups Projects
Commit eff2ad4d authored by Matthias Urhahn's avatar Matthias Urhahn
Browse files

Merge branch 'release/1.7.x' into release/1.8.x

parents fc33f8d1 e5fe96de
No related branches found
No related tags found
No related merge requests found
...@@ -91,7 +91,7 @@ android { ...@@ -91,7 +91,7 @@ android {
signingProps.load(new FileInputStream(signingPropFile)) signingProps.load(new FileInputStream(signingPropFile))
signingConfigs { signingConfigs {
deviceRelease { deviceRelease {
if(signingProps['deviceRelease.storePath'] != null) { if (signingProps['deviceRelease.storePath'] != null) {
storeFile file(signingProps['deviceRelease.storePath']) storeFile file(signingProps['deviceRelease.storePath'])
keyAlias signingProps['deviceRelease.keyAlias'] keyAlias signingProps['deviceRelease.keyAlias']
storePassword signingProps['deviceRelease.storePassword'] storePassword signingProps['deviceRelease.storePassword']
...@@ -99,7 +99,7 @@ android { ...@@ -99,7 +99,7 @@ android {
} }
} }
deviceForTestersRelease { deviceForTestersRelease {
if(signingProps['deviceForTestersRelease.storePath'] != null) { if (signingProps['deviceForTestersRelease.storePath'] != null) {
storeFile file(signingProps['deviceForTestersRelease.storePath']) storeFile file(signingProps['deviceForTestersRelease.storePath'])
keyAlias signingProps['deviceForTestersRelease.keyAlias'] keyAlias signingProps['deviceForTestersRelease.keyAlias']
storePassword signingProps['deviceForTestersRelease.storePassword'] storePassword signingProps['deviceForTestersRelease.storePassword']
...@@ -163,6 +163,12 @@ android { ...@@ -163,6 +163,12 @@ android {
} }
println("deviceForTesters adjusted versionName: $adjustedVersionName") println("deviceForTesters adjusted versionName: $adjustedVersionName")
} }
variant.outputs.each { output ->
def apkName = "Corona-Warn-App-${output.versionNameOverride}-${flavor.name}-${variant.buildType.name}.apk"
println("APK Name: $apkName")
output.outputFileName = apkName
}
} }
buildFeatures { buildFeatures {
......
...@@ -47,7 +47,7 @@ class ErrorReportReceiver(private val activity: Activity) : BroadcastReceiver() ...@@ -47,7 +47,7 @@ class ErrorReportReceiver(private val activity: Activity) : BroadcastReceiver()
message += "#$apiStatusCode" message += "#$apiStatusCode"
} }
val dialogTitle = if (intent.hasExtra(ReportingConstants.ERROR_REPORT_TITLE_EXTRA)) { val dialogTitle = if (intent.getStringExtra(ReportingConstants.ERROR_REPORT_TITLE_EXTRA) != null) {
intent.getStringExtra(ReportingConstants.ERROR_REPORT_TITLE_EXTRA) intent.getStringExtra(ReportingConstants.ERROR_REPORT_TITLE_EXTRA)
} else { } else {
val errorTitle = context.resources.getString(R.string.errors_generic_details_headline) val errorTitle = context.resources.getString(R.string.errors_generic_details_headline)
......
...@@ -10,8 +10,9 @@ import de.rki.coronawarnapp.exception.ExceptionCategory ...@@ -10,8 +10,9 @@ import de.rki.coronawarnapp.exception.ExceptionCategory
import de.rki.coronawarnapp.exception.reporting.ReportingConstants.STATUS_CODE_GOOGLE_API_FAIL import de.rki.coronawarnapp.exception.reporting.ReportingConstants.STATUS_CODE_GOOGLE_API_FAIL
import de.rki.coronawarnapp.exception.reporting.ReportingConstants.STATUS_CODE_GOOGLE_UPDATE_NEEDED import de.rki.coronawarnapp.exception.reporting.ReportingConstants.STATUS_CODE_GOOGLE_UPDATE_NEEDED
import de.rki.coronawarnapp.exception.reporting.ReportingConstants.STATUS_CODE_REACHED_REQUEST_LIMIT import de.rki.coronawarnapp.exception.reporting.ReportingConstants.STATUS_CODE_REACHED_REQUEST_LIMIT
import de.rki.coronawarnapp.util.tryHumanReadableError
import de.rki.coronawarnapp.util.CWADebug import de.rki.coronawarnapp.util.CWADebug
import de.rki.coronawarnapp.util.HasHumanReadableError
import de.rki.coronawarnapp.util.tryHumanReadableError
import java.io.PrintWriter import java.io.PrintWriter
import java.io.StringWriter import java.io.StringWriter
...@@ -28,14 +29,20 @@ fun Throwable.report( ...@@ -28,14 +29,20 @@ fun Throwable.report(
reportProblem(tag = prefix, info = suffix) reportProblem(tag = prefix, info = suffix)
val context = CoronaWarnApplication.getAppContext() val context = CoronaWarnApplication.getAppContext()
val formattedError = this.tryHumanReadableError(context)
val intent = Intent(ReportingConstants.ERROR_REPORT_LOCAL_BROADCAST_CHANNEL) val intent = Intent(ReportingConstants.ERROR_REPORT_LOCAL_BROADCAST_CHANNEL)
intent.putExtra(ReportingConstants.ERROR_REPORT_CATEGORY_EXTRA, exceptionCategory.name) intent.putExtra(ReportingConstants.ERROR_REPORT_CATEGORY_EXTRA, exceptionCategory.name)
intent.putExtra(ReportingConstants.ERROR_REPORT_PREFIX_EXTRA, prefix) intent.putExtra(ReportingConstants.ERROR_REPORT_PREFIX_EXTRA, prefix)
intent.putExtra(ReportingConstants.ERROR_REPORT_SUFFIX_EXTRA, suffix) intent.putExtra(ReportingConstants.ERROR_REPORT_SUFFIX_EXTRA, suffix)
intent.putExtra(ReportingConstants.ERROR_REPORT_TITLE_EXTRA, formattedError.title)
intent.putExtra(ReportingConstants.ERROR_REPORT_MESSAGE_EXTRA, formattedError.description) if (this is HasHumanReadableError) {
val humanReadable = this.tryHumanReadableError(context)
humanReadable.title?.let {
intent.putExtra(ReportingConstants.ERROR_REPORT_TITLE_EXTRA, it)
}
intent.putExtra(ReportingConstants.ERROR_REPORT_MESSAGE_EXTRA, humanReadable.description)
} else {
intent.putExtra(ReportingConstants.ERROR_REPORT_MESSAGE_EXTRA, this.message)
}
if (this is ReportedExceptionInterface) { if (this is ReportedExceptionInterface) {
intent.putExtra(ReportingConstants.ERROR_REPORT_CODE_EXTRA, this.code) intent.putExtra(ReportingConstants.ERROR_REPORT_CODE_EXTRA, this.code)
......
...@@ -71,7 +71,7 @@ class BaseKeyPackageSyncToolTest : BaseIOTest() { ...@@ -71,7 +71,7 @@ class BaseKeyPackageSyncToolTest : BaseIOTest() {
) )
@Test @Test
fun `key invalidation based on ETags`() = runBlockingTest { fun `revoke keys based on ETags and return true if something happened`() = runBlockingTest {
val invalidatedDay = mockk<KeyDownloadConfig.RevokedKeyPackage>().apply { val invalidatedDay = mockk<KeyDownloadConfig.RevokedKeyPackage>().apply {
every { etag } returns "etag-badday" every { etag } returns "etag-badday"
} }
...@@ -106,7 +106,12 @@ class BaseKeyPackageSyncToolTest : BaseIOTest() { ...@@ -106,7 +106,12 @@ class BaseKeyPackageSyncToolTest : BaseIOTest() {
coEvery { keyCache.getAllCachedKeys() } returns listOf(badDay, goodDay, badHour, goodHour) coEvery { keyCache.getAllCachedKeys() } returns listOf(badDay, goodDay, badHour, goodHour)
val instance = createInstance() val instance = createInstance()
instance.revokeCachedKeys(listOf(invalidatedDay, invalidatedHour)) instance.revokeCachedKeys(listOf(invalidatedDay, invalidatedHour)) shouldBe true
coEvery { keyCache.getAllCachedKeys() } returns emptyList()
instance.revokeCachedKeys(listOf(invalidatedDay, invalidatedHour)) shouldBe false
instance.revokeCachedKeys(emptyList()) shouldBe false
coVerify { keyCache.delete(listOf(badDayInfo, badHourInfo)) } coVerify { keyCache.delete(listOf(badDayInfo, badHourInfo)) }
} }
......
...@@ -20,4 +20,4 @@ org.gradle.dependency.verification.console=verbose ...@@ -20,4 +20,4 @@ org.gradle.dependency.verification.console=verbose
VERSION_MAJOR=1 VERSION_MAJOR=1
VERSION_MINOR=8 VERSION_MINOR=8
VERSION_PATCH=0 VERSION_PATCH=0
VERSION_BUILD=1 VERSION_BUILD=2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment