FGA icon indicating copy to clipboard operation
FGA copied to clipboard

chore: add param for hilt injected parameters

Open ArthurKun21 opened this issue 4 months ago • 1 comments

This pull request refactors multiple service and utility classes to improve dependency injection annotations for constructor parameters. The main change is replacing property annotations like @ApplicationContext and @ServiceCoroutineScope with parameter annotations (@param:ApplicationContext, @param:ServiceCoroutineScope) in constructors. This ensures proper annotation usage for dependency injection frameworks such as Dagger/Hilt, leading to clearer and more reliable injection of context and coroutine scope dependencies.

Dependency Injection Annotation Improvements:

  • Updated constructors in TesseractOcrService, ScriptManager, ScriptRunnerServiceController, AndroidImpl, ImageLoader, StorageProvider, and PrefsCore to use @param:ApplicationContext for the context parameter, ensuring correct context injection. [1] [2] [3] [4] [5] [6]
  • Updated constructors in ScriptManager, ScriptRunnerServiceController, and AndroidImpl to use @param:ServiceCoroutineScope for the scope parameter, ensuring the coroutine scope is correctly injected. [1] [2] [3]

ArthurKun21 avatar Aug 20 '25 06:08 ArthurKun21

Build 742

Download the latest APK for testing here

[!NOTE] You need a GitHub account to download the APK.

This URL is valid as long as the artifact has not expired yet.

github-actions[bot] avatar Aug 20 '25 06:08 github-actions[bot]