Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

refactor: inject AuthorizationService using Hilt

Fahim M. Choudhury requested to merge 3540-sync-not-working-on-oauth-accounts into main

Description

This MR refactors the OpenIdAuthenticationViewModel, OpenIdEndSessionActivity, SyncManager, and DefaultAccountAuthenticatorService to use Hilt for injecting the AuthorizationService. Previously, there were manual creation of it, which might cause issues with the dispose() method.

Key changes:

  • Ensured AuthorizationService is configured to use /e/OS's Browser (Constants.E_BROWSER_PACKAGE_NAME) for authentication flows within OAuthModule.
  • Updated logging level for AuthorizationService.dispose() failures from INFO to WARNING.

Technical details

To address issue reported in Logcat:

  • Service at.bitfire.davdroid.syncadapter.EeloAccountAuthenticatorService has leaked ServiceConnection net.openid.appauth.browser.CustomTabManager$1@5358da that was originally bound here
  • [syncadapter.DefaultAccountAuthenticatorService] failed to dispose oidc authorizationService

Issues

https://gitlab.e.foundation/e/os/backlog/-/issues/3540

https://gitlab.e.foundation/e/os/backlog/-/issues/3530

10 commandments of code review

👪 ❤️ https://gitlab.e.foundation/groups/e/-/wikis/contribute/development-processes/code-review-guidelines

Edited by Fahim M. Choudhury

Merge request reports

Loading