Loading app/src/main/java/foundation/e/apps/data/NetworkHandler.kt +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ private fun <T> resultSupremeGplayHttpRequestException(e: GplayHttpRequestExcept private fun <T> handleOthersException(e: Exception): ResultSupreme.Error<T> { val message = extractErrorMessage(e) Timber.d("message: $message exceptoin: $e") return ResultSupreme.Error(message, e) } Loading app/src/main/java/foundation/e/apps/data/application/data/Application.kt +3 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,9 @@ data class Application( var isGplayReplaced: Boolean = false, @SerializedName(value = "on_fdroid") val isFDroidApp: Boolean = false, val contentRating: ContentRating = ContentRating() val contentRating: ContentRating = ContentRating(), @SerializedName(value = "antifeature") val antiFeatures: Map<String, Map<String,String>> = emptyMap(), ) { fun updateType() { this.type = if (this.is_pwa) PWA else NATIVE Loading app/src/main/java/foundation/e/apps/data/cleanapk/CleanApkRetrofit.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ interface CleanApkRetrofit { companion object { // API endpoints const val BASE_URL = "https://api.cleanapk.org/v2/" const val ASSET_URL = "https://api.cleanapk.org/v2/media/" const val BASE_URL = "https://api.dev.cleanapk.org/v2/" const val ASSET_URL = "https://api.dev.cleanapk.org/v2/media/" // Application sources const val APP_SOURCE_FOSS = "open" Loading app/src/main/java/foundation/e/apps/data/cleanapk/RetrofitModule.kt +4 −1 Original line number Diff line number Diff line Loading @@ -165,12 +165,15 @@ object RetrofitModule { fun provideInterceptor(): Interceptor { return Interceptor { chain -> val builder = chain.request().newBuilder() Timber.d("Request: URL: ${chain.request().url}") builder.header( "User-Agent", "Dalvik/2.1.0 (Linux; U; Android ${Build.VERSION.RELEASE};)" ).header("Accept-Language", Locale.getDefault().language) return@Interceptor chain.proceed(builder.build()) val response = chain.proceed(builder.build()) Timber.d("Response: Code: ${response.code} message: ${response.message}") return@Interceptor response } } Loading Loading
app/src/main/java/foundation/e/apps/data/NetworkHandler.kt +1 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ private fun <T> resultSupremeGplayHttpRequestException(e: GplayHttpRequestExcept private fun <T> handleOthersException(e: Exception): ResultSupreme.Error<T> { val message = extractErrorMessage(e) Timber.d("message: $message exceptoin: $e") return ResultSupreme.Error(message, e) } Loading
app/src/main/java/foundation/e/apps/data/application/data/Application.kt +3 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,9 @@ data class Application( var isGplayReplaced: Boolean = false, @SerializedName(value = "on_fdroid") val isFDroidApp: Boolean = false, val contentRating: ContentRating = ContentRating() val contentRating: ContentRating = ContentRating(), @SerializedName(value = "antifeature") val antiFeatures: Map<String, Map<String,String>> = emptyMap(), ) { fun updateType() { this.type = if (this.is_pwa) PWA else NATIVE Loading
app/src/main/java/foundation/e/apps/data/cleanapk/CleanApkRetrofit.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ interface CleanApkRetrofit { companion object { // API endpoints const val BASE_URL = "https://api.cleanapk.org/v2/" const val ASSET_URL = "https://api.cleanapk.org/v2/media/" const val BASE_URL = "https://api.dev.cleanapk.org/v2/" const val ASSET_URL = "https://api.dev.cleanapk.org/v2/media/" // Application sources const val APP_SOURCE_FOSS = "open" Loading
app/src/main/java/foundation/e/apps/data/cleanapk/RetrofitModule.kt +4 −1 Original line number Diff line number Diff line Loading @@ -165,12 +165,15 @@ object RetrofitModule { fun provideInterceptor(): Interceptor { return Interceptor { chain -> val builder = chain.request().newBuilder() Timber.d("Request: URL: ${chain.request().url}") builder.header( "User-Agent", "Dalvik/2.1.0 (Linux; U; Android ${Build.VERSION.RELEASE};)" ).header("Accept-Language", Locale.getDefault().language) return@Interceptor chain.proceed(builder.build()) val response = chain.proceed(builder.build()) Timber.d("Response: Code: ${response.code} message: ${response.message}") return@Interceptor response } } Loading