From e3657c5176aa3c27dd4722662dd7c7adae22ee4e Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 28 Oct 2008 07:04:44 +0600 Subject: [PATCH 01/10] Configure Microsoft account integration for official, community and test platforms The redirect URI generated by Microsoft Azure portal is different for each platform keystore: official, community and test. So, the value needs to be updated at runtime based on the release type found in system properties. --- app/k9mail/build.gradle.kts | 39 +++++++++++++++++ .../k9/auth/AppOAuthConfigurationFactory.kt | 2 +- .../k9/auth/MicrosoftRedirectUriGenerator.kt | 22 ++++++++++ .../com/fsck/k9/auth/ReleaseTypeHelper.kt | 43 +++++++++++++++++++ 4 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt create mode 100644 app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt diff --git a/app/k9mail/build.gradle.kts b/app/k9mail/build.gradle.kts index 88d056375e..1fdf2c7ec0 100644 --- a/app/k9mail/build.gradle.kts +++ b/app/k9mail/build.gradle.kts @@ -126,12 +126,31 @@ android { "\"dj0yJmk9dUNqYXZhYWxOYkdRJmQ9WVdrOU1YQnZVRFZoY1ZrbWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PWIw\"", ) buildConfigField("String", "OAUTH_MICROSOFT_CLIENT_ID", "\"${getProperty("MICROSOFT_CLIENT_ID")}\"") + buildConfigField( "String", "OAUTH_MICROSOFT_REDIRECT_URI", "\"msauth://foundation.e.mail/${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX")}\"", ) + buildConfigField( + "String", + "MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY", + "\"${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY")}\"", + ) + + buildConfigField( + "String", + "MICROSOFT_REDIRECT_URI_SUFFIX_OFFICIAL", + "\"${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX_OFFICIAL")}\"", + ) + + buildConfigField( + "String", + "MICROSOFT_REDIRECT_URI_SUFFIX_TEST", + "\"${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX_TEST")}\"", + ) + manifestPlaceholders["appAuthRedirectScheme"] = "foundation.e.mail" } @@ -157,13 +176,33 @@ android { "OAUTH_AOL_CLIENT_ID", "\"dj0yJmk9cHYydkJkTUxHcXlYJmQ9WVdrOWVHZHhVVXN4VVV3bWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PTdm\"", ) + buildConfigField("String", "OAUTH_MICROSOFT_CLIENT_ID", "\"${getProperty("MICROSOFT_CLIENT_ID")}\"") + buildConfigField( "String", "OAUTH_MICROSOFT_REDIRECT_URI", "\"msauth://foundation.e.mail/${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX")}\"", ) + buildConfigField( + "String", + "MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY", + "\"${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY")}\"", + ) + + buildConfigField( + "String", + "MICROSOFT_REDIRECT_URI_SUFFIX_OFFICIAL", + "\"${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX_OFFICIAL")}\"", + ) + + buildConfigField( + "String", + "MICROSOFT_REDIRECT_URI_SUFFIX_TEST", + "\"${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX_TEST")}\"", + ) + manifestPlaceholders["appAuthRedirectScheme"] = "foundation.e.mail.debug" } } diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/AppOAuthConfigurationFactory.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/AppOAuthConfigurationFactory.kt index 0116365aeb..89654a5a10 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/AppOAuthConfigurationFactory.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/AppOAuthConfigurationFactory.kt @@ -52,7 +52,7 @@ class AppOAuthConfigurationFactory : OAuthConfigurationFactory { ), authorizationEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", tokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token", - redirectUri = BuildConfig.OAUTH_MICROSOFT_REDIRECT_URI, + redirectUri = MicrosoftRedirectUriGenerator.generate(), ) } diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt new file mode 100644 index 0000000000..d280378efe --- /dev/null +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt @@ -0,0 +1,22 @@ +package com.fsck.k9.auth + +import com.fsck.k9.BuildConfig +import com.fsck.k9.auth.ReleaseType.Community +import com.fsck.k9.auth.ReleaseType.Official +import com.fsck.k9.auth.ReleaseType.Test +import com.fsck.k9.auth.ReleaseType.Unknown + +object MicrosoftRedirectUriGenerator { + fun generate(): String { + val releaseType = ReleaseTypeHelper.getReleaseType() + + val redirectUriSuffix = when (releaseType) { + Community -> BuildConfig.MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY + Official -> BuildConfig.MICROSOFT_REDIRECT_URI_SUFFIX_OFFICIAL + Test -> BuildConfig.MICROSOFT_REDIRECT_URI_SUFFIX_TEST + Unknown -> "Unknown" + } + + return "msauth://${BuildConfig.APPLICATION_ID}/$redirectUriSuffix" + } +} diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt new file mode 100644 index 0000000000..acc2f4f324 --- /dev/null +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt @@ -0,0 +1,43 @@ +package com.fsck.k9.auth + +import android.annotation.SuppressLint +import com.fsck.k9.auth.ReleaseType.Community +import com.fsck.k9.auth.ReleaseType.Official +import com.fsck.k9.auth.ReleaseType.Test +import com.fsck.k9.auth.ReleaseType.Unknown +import com.fsck.k9.logging.Timber + +object ReleaseTypeHelper { + + private const val KEY_SYSTEM_PROPERTY_RELEASE_TYPE = "ro.lineage.releasetype" + + fun getReleaseType(): ReleaseType { + val property = getSystemProperty(KEY_SYSTEM_PROPERTY_RELEASE_TYPE) + + return when (property) { + Community.value -> Community + Official.value -> Official + Test.value -> Test + else -> Unknown + } + } +} + +enum class ReleaseType(val value: String) { + Community("community"), + Official("official"), + Test("test"), + Unknown("") +} + +@SuppressLint("PrivateApi") +private fun getSystemProperty(key: String): String { + return try { + Class.forName("android.os.SystemProperties") + .getMethod("get", String::class.java) + .invoke(null, key) as String + } catch (e: Exception) { + Timber.w("Unable to determine system property for $key") + "" + } +} -- GitLab From 96ea3f22f3dc41b63c612e05a2cd9848bdf537a8 Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Fri, 13 Dec 2024 15:36:18 +0600 Subject: [PATCH 02/10] Remove unused field from build.gradle --- app/k9mail/build.gradle.kts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/app/k9mail/build.gradle.kts b/app/k9mail/build.gradle.kts index 1fdf2c7ec0..3711999c61 100644 --- a/app/k9mail/build.gradle.kts +++ b/app/k9mail/build.gradle.kts @@ -127,12 +127,6 @@ android { ) buildConfigField("String", "OAUTH_MICROSOFT_CLIENT_ID", "\"${getProperty("MICROSOFT_CLIENT_ID")}\"") - buildConfigField( - "String", - "OAUTH_MICROSOFT_REDIRECT_URI", - "\"msauth://foundation.e.mail/${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX")}\"", - ) - buildConfigField( "String", "MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY", @@ -178,13 +172,7 @@ android { ) buildConfigField("String", "OAUTH_MICROSOFT_CLIENT_ID", "\"${getProperty("MICROSOFT_CLIENT_ID")}\"") - - buildConfigField( - "String", - "OAUTH_MICROSOFT_REDIRECT_URI", - "\"msauth://foundation.e.mail/${getProperty("MICROSOFT_REDIRECT_URI_SUFFIX")}\"", - ) - + buildConfigField( "String", "MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY", -- GitLab From bb7c831f5397addf4504f643c40bd3122f0a6f00 Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Fri, 13 Dec 2024 15:37:53 +0600 Subject: [PATCH 03/10] Export all variable in CI pipeline --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0a4f000e0..d6937450b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,7 @@ stages: before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew +- export # FIXME: Remove when testing done cache: key: ${CI_PROJECT_ID} -- GitLab From 7ee322c88cffe67d10664e5e19e532f9cbf2a6f2 Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Fri, 13 Dec 2024 15:43:27 +0600 Subject: [PATCH 04/10] Revert "Export all variable in CI pipeline" This reverts commit bb7c831f5397addf4504f643c40bd3122f0a6f00. --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6937450b3..e0a4f000e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,6 @@ stages: before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew -- export # FIXME: Remove when testing done cache: key: ${CI_PROJECT_ID} -- GitLab From 1ca8ef34db8e528b3658f96a1e9aca522722205d Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Fri, 13 Dec 2024 15:48:21 +0600 Subject: [PATCH 05/10] Add logging for redirect URI --- .../java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt index d280378efe..e2c58f76e5 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt @@ -5,6 +5,7 @@ import com.fsck.k9.auth.ReleaseType.Community import com.fsck.k9.auth.ReleaseType.Official import com.fsck.k9.auth.ReleaseType.Test import com.fsck.k9.auth.ReleaseType.Unknown +import com.fsck.k9.logging.Timber object MicrosoftRedirectUriGenerator { fun generate(): String { @@ -17,6 +18,9 @@ object MicrosoftRedirectUriGenerator { Unknown -> "Unknown" } - return "msauth://${BuildConfig.APPLICATION_ID}/$redirectUriSuffix" + val redirectUri = "msauth://foundation.e.mail/$redirectUriSuffix" + Timber.e("Redirect URI for Microsoft: $redirectUri") // TODO: Remove when testing done + + return redirectUri } } -- GitLab From 308cab9f07361a2d1eca5187002a4fd24d8e41e9 Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Fri, 13 Dec 2024 16:41:07 +0600 Subject: [PATCH 06/10] Add url encoding for redirect URI to parse it with % character --- .../java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt index e2c58f76e5..8a7b52fdb4 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt @@ -6,6 +6,7 @@ import com.fsck.k9.auth.ReleaseType.Official import com.fsck.k9.auth.ReleaseType.Test import com.fsck.k9.auth.ReleaseType.Unknown import com.fsck.k9.logging.Timber +import java.net.URLEncoder object MicrosoftRedirectUriGenerator { fun generate(): String { @@ -18,7 +19,7 @@ object MicrosoftRedirectUriGenerator { Unknown -> "Unknown" } - val redirectUri = "msauth://foundation.e.mail/$redirectUriSuffix" + val redirectUri = "msauth://foundation.e.mail/${URLEncoder.encode(redirectUriSuffix, "UTF-8")}" Timber.e("Redirect URI for Microsoft: $redirectUri") // TODO: Remove when testing done return redirectUri -- GitLab From e7ddf1e65667dcc239caeceb24a6e19920a74a28 Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Sat, 14 Dec 2024 01:41:04 +0600 Subject: [PATCH 07/10] Remove redundant encoding of redirect URI --- .../fsck/k9/auth/MicrosoftRedirectUriGenerator.kt | 15 +++++++-------- .../java/com/fsck/k9/auth/ReleaseTypeHelper.kt | 6 +++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt index 8a7b52fdb4..87457e6b0d 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt @@ -4,23 +4,22 @@ import com.fsck.k9.BuildConfig import com.fsck.k9.auth.ReleaseType.Community import com.fsck.k9.auth.ReleaseType.Official import com.fsck.k9.auth.ReleaseType.Test -import com.fsck.k9.auth.ReleaseType.Unknown -import com.fsck.k9.logging.Timber -import java.net.URLEncoder +import com.fsck.k9.auth.ReleaseType.Unavailable object MicrosoftRedirectUriGenerator { fun generate(): String { val releaseType = ReleaseTypeHelper.getReleaseType() - val redirectUriSuffix = when (releaseType) { Community -> BuildConfig.MICROSOFT_REDIRECT_URI_SUFFIX_COMMUNITY Official -> BuildConfig.MICROSOFT_REDIRECT_URI_SUFFIX_OFFICIAL - Test -> BuildConfig.MICROSOFT_REDIRECT_URI_SUFFIX_TEST - Unknown -> "Unknown" + Test, Unavailable -> BuildConfig.MICROSOFT_REDIRECT_URI_SUFFIX_TEST } - val redirectUri = "msauth://foundation.e.mail/${URLEncoder.encode(redirectUriSuffix, "UTF-8")}" - Timber.e("Redirect URI for Microsoft: $redirectUri") // TODO: Remove when testing done + // For debug build (foundation.e.mail.debug), update the hash of your debug keystore in Microsoft Azure portal, + // and based on that, set the redirectUriSuffix as it is a combination of both + // the applicationId and signature hash of the keystore. + + val redirectUri = "msauth://${BuildConfig.APPLICATION_ID}/$redirectUriSuffix" return redirectUri } diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt index acc2f4f324..908452d3a8 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt @@ -4,7 +4,7 @@ import android.annotation.SuppressLint import com.fsck.k9.auth.ReleaseType.Community import com.fsck.k9.auth.ReleaseType.Official import com.fsck.k9.auth.ReleaseType.Test -import com.fsck.k9.auth.ReleaseType.Unknown +import com.fsck.k9.auth.ReleaseType.Unavailable import com.fsck.k9.logging.Timber object ReleaseTypeHelper { @@ -18,7 +18,7 @@ object ReleaseTypeHelper { Community.value -> Community Official.value -> Official Test.value -> Test - else -> Unknown + else -> Unavailable } } } @@ -27,7 +27,7 @@ enum class ReleaseType(val value: String) { Community("community"), Official("official"), Test("test"), - Unknown("") + Unavailable("") } @SuppressLint("PrivateApi") -- GitLab From 1d5df4a72a01d2b2b6c7a925e7abbecff218703c Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Mon, 16 Dec 2024 14:14:56 +0600 Subject: [PATCH 08/10] Update copyright info --- .../k9/auth/MicrosoftRedirectUriGenerator.kt | 18 ++++++++++++++++++ .../java/com/fsck/k9/auth/ReleaseTypeHelper.kt | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt index 87457e6b0d..a7f3a5d776 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2024 e Foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + package com.fsck.k9.auth import com.fsck.k9.BuildConfig diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt index 908452d3a8..42f0664a5a 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt @@ -1,3 +1,21 @@ +/* + * Copyright (C) 2024 e Foundation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + package com.fsck.k9.auth import android.annotation.SuppressLint -- GitLab From d6ede6620837fddef5cacfc9b0774d7f7502498b Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Mon, 16 Dec 2024 14:15:23 +0600 Subject: [PATCH 09/10] Add stacktrace for better logging --- app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt index 42f0664a5a..2e5c94482d 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt @@ -56,6 +56,7 @@ private fun getSystemProperty(key: String): String { .invoke(null, key) as String } catch (e: Exception) { Timber.w("Unable to determine system property for $key") + e.printStackTrace() "" } } -- GitLab From 24c6e623d4ec5c757b7b2406d3bbee65ebd7a9ba Mon Sep 17 00:00:00 2001 From: Fahim Masud Choudhury Date: Tue, 17 Dec 2024 16:09:50 +0600 Subject: [PATCH 10/10] Refactor minor code organization and logging --- .../java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt | 4 +--- .../src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt index a7f3a5d776..88b165fb97 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/MicrosoftRedirectUriGenerator.kt @@ -37,8 +37,6 @@ object MicrosoftRedirectUriGenerator { // and based on that, set the redirectUriSuffix as it is a combination of both // the applicationId and signature hash of the keystore. - val redirectUri = "msauth://${BuildConfig.APPLICATION_ID}/$redirectUriSuffix" - - return redirectUri + return "msauth://${BuildConfig.APPLICATION_ID}/$redirectUriSuffix" } } diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt index 2e5c94482d..00c9585438 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/auth/ReleaseTypeHelper.kt @@ -55,8 +55,7 @@ private fun getSystemProperty(key: String): String { .getMethod("get", String::class.java) .invoke(null, key) as String } catch (e: Exception) { - Timber.w("Unable to determine system property for $key") - e.printStackTrace() - "" + Timber.e("Unable to determine system property for $key", e) + Unavailable.value } } -- GitLab