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

Commit 278ddf85 authored by Hasib Prince's avatar Hasib Prince
Browse files

setup dev environment

parent b52bf3fb
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)
}

+3 −1
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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"
+4 −1
Original line number Diff line number Diff line
@@ -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
        }
    }