refactor: inject AuthorizationService using Hilt
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
Edited by Fahim M. Choudhury