From 932ed2633e89af60ffbc3c31610ef133b3a1f4c7 Mon Sep 17 00:00:00 2001 From: Phie Date: Wed, 20 Nov 2019 15:58:11 +0000 Subject: [PATCH 1/3] always refresh when asked since it happens when an app using the api encounters autentification issues + return null when sending an async response, as the api describes (cherry picked from commit 99ff2f4af043e5dcbf9c91816b83c2fb1dae9caf) --- .../syncadapter/GoogleAccountAuthenticatorService.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/foundation/e/accountmanager/syncadapter/GoogleAccountAuthenticatorService.kt b/app/src/main/java/foundation/e/accountmanager/syncadapter/GoogleAccountAuthenticatorService.kt index a3abccbd7..5215dab36 100644 --- a/app/src/main/java/foundation/e/accountmanager/syncadapter/GoogleAccountAuthenticatorService.kt +++ b/app/src/main/java/foundation/e/accountmanager/syncadapter/GoogleAccountAuthenticatorService.kt @@ -123,12 +123,12 @@ class GoogleAccountAuthenticatorService : Service(), OnAccountsUpdateListener { override fun getAuthTokenLabel(p0: String?) = null override fun confirmCredentials(p0: AccountAuthenticatorResponse?, p1: Account?, p2: Bundle?) = null override fun updateCredentials(p0: AccountAuthenticatorResponse?, p1: Account?, p2: String?, p3: Bundle?) = null - override fun getAuthToken(response: AccountAuthenticatorResponse?, account: Account?, authTokenType: String?, options: Bundle?): Bundle { + override fun getAuthToken(response: AccountAuthenticatorResponse?, account: Account?, authTokenType: String?, options: Bundle?): Bundle? { val accountManager = AccountManager.get(context) val authState = AuthState.jsonDeserialize(accountManager.getUserData(account, AccountSettings.KEY_AUTH_STATE)) if (authState != null) { - if (authState.needsTokenRefresh) { + if (authState.needsTokenRefresh || true) { //keep true for now since it is refreshed only when invalidated, so when having an issue val tokenRequest = authState.createTokenRefreshRequest() AuthorizationService(context).performTokenRequest(tokenRequest) { tokenResponse, ex -> @@ -140,6 +140,7 @@ class GoogleAccountAuthenticatorService : Service(), OnAccountsUpdateListener { result.putString(AccountManager.KEY_AUTHTOKEN, authState.accessToken) response?.onResult(result) } + return null; //should return null when returned via an async response } else { val result = Bundle() -- GitLab From 69c410382a3b5960ab4e89e1ff188fddffb57e5c Mon Sep 17 00:00:00 2001 From: Mohit Date: Mon, 17 Feb 2020 04:02:34 +0000 Subject: [PATCH 2/3] Update account's Creation UI (cherry picked from commit f9a7d446b2e48edfdfefd0c4103d3d72ee854648) --- app/src/main/res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f9fa3e4f8..4151eda74 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -183,9 +183,9 @@ Show details Use custom server - Server URL + Server URL (https://server_url) Valid server URL address required - Login with an other account + Use a specific server Settings: %s -- GitLab From fb290834e68f7b79495f57b59d8b830283fd8c62 Mon Sep 17 00:00:00 2001 From: Manoj Nair Date: Sun, 15 Mar 2020 10:38:07 +0000 Subject: [PATCH 3/3] Added translation using Weblate (Romanian) --- app/src/main/res/values-ro/strings.xml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/src/main/res/values-ro/strings.xml diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml new file mode 100644 index 000000000..a6b3daec9 --- /dev/null +++ b/app/src/main/res/values-ro/strings.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file -- GitLab