@@ -85,7 +85,7 @@ interface EvaluationApi {
8585 ): StrapiAnswer
8686}
8787
88- class EvaluationService @Inject constructor(
88+ open class EvaluationService @Inject constructor(
8989 @ApplicationContext private val context : Context
9090) {
9191 companion object {
@@ -115,7 +115,7 @@ class EvaluationService @Inject constructor(
115115 evaluationsApi = retrofit.create(EvaluationApi ::class .java)
116116 }
117117
118- suspend fun listLatestEvaluations (pageNumber : Int ): Result <List <Evaluation >> =
118+ open suspend fun listLatestEvaluations (pageNumber : Int ): Result <List <Evaluation >> =
119119 runCatching {
120120 val strapiAnswer = evaluationsApi.listLatestEvaluationsAsync(
121121 settings.getRootConfigurationLevel(),
@@ -130,7 +130,7 @@ class EvaluationService @Inject constructor(
130130 }
131131 }
132132
133- suspend fun searchEvaluation (pattern : String ): Result <List <Evaluation >> =
133+ open suspend fun searchEvaluation (pattern : String ): Result <List <Evaluation >> =
134134 runCatching {
135135 val strapiAnswer = evaluationsApi.searchAsync(
136136 pattern,
@@ -146,25 +146,25 @@ class EvaluationService @Inject constructor(
146146 .distinctBy { it.packageName }
147147 }
148148
149- suspend fun existingEvaluations (packageName : String ): Result <List <StrapiElement >> =
149+ open suspend fun existingEvaluations (packageName : String ): Result <List <StrapiElement >> =
150150 runCatching {
151151 val strapiAnswer = evaluationsApi.existingEvaluationsAsync(packageName)
152152 strapiAnswer.data.toList()
153153 }
154154
155- suspend fun addEvaluation (app : UploadEvaluationHeader ): Result <Unit > =
155+ open suspend fun addEvaluation (app : UploadEvaluationHeader ): Result <Unit > =
156156 runCatching {
157157 evaluationsApi.addEvaluation(app)
158158 Unit
159159 }
160160
161- suspend fun updateEvaluation (app : UploadEvaluationHeader , id : Int ): Result <Unit > =
161+ open suspend fun updateEvaluation (app : UploadEvaluationHeader , id : Int ): Result <Unit > =
162162 runCatching {
163163 evaluationsApi.updateEvaluation(app, id)
164164 Unit
165165 }
166166
167- suspend fun uploadIcon (packageName : String ): Result <List <IconAnswer >> {
167+ open suspend fun uploadIcon (packageName : String ): Result <List <IconAnswer >> {
168168 return runCatching {
169169 val appInfo = context.packageManager.getApplicationInfo(packageName, 0 )
170170 val drawable = context.packageManager.getApplicationIcon(appInfo)
@@ -182,18 +182,18 @@ class EvaluationService @Inject constructor(
182182 }
183183 }
184184
185- suspend fun existingIcon (iconName : String ): Result <List <IconAnswer >> =
185+ open suspend fun existingIcon (iconName : String ): Result <List <IconAnswer >> =
186186 runCatching {
187187 evaluationsApi.existingIconAsync(iconName)
188188 }
189189
190- suspend fun deleteIcon (id : Int ): Result <Unit > =
190+ open suspend fun deleteIcon (id : Int ): Result <Unit > =
191191 runCatching {
192192 evaluationsApi.deleteIcon(id)
193193 Unit
194194 }
195195
196- suspend fun fetchEvaluation (appPackageName : String , microG : Int , rooted : Int ): Result <Evaluation ?> =
196+ open suspend fun fetchEvaluation (appPackageName : String , microG : Int , rooted : Int ): Result <Evaluation ?> =
197197 runCatching {
198198 val answer = evaluationsApi.getSingleEvaluationAsync(
199199 appPackageName,
0 commit comments