Loading app/src/main/java/foundation/e/apps/data/cleanapk/RetrofitModule.kt +2 −21 Original line number Diff line number Diff line Loading @@ -169,28 +169,9 @@ object RetrofitModule { "User-Agent", "Dalvik/2.1.0 (Linux; U; Android ${Build.VERSION.RELEASE};)" ).header("Accept-Language", Locale.getDefault().language) try { return@Interceptor chain.proceed(builder.build()) } catch (e: ConnectException) { return@Interceptor buildErrorResponse(e, chain) } catch (e: Exception) { return@Interceptor buildErrorResponse(e, chain) } } } private fun buildErrorResponse( e: Exception, chain: Interceptor.Chain ): Response { Timber.e("buildErrorResponse: ${e.localizedMessage}") return Response.Builder() .code(403) .message(e.localizedMessage ?: "Unknown error") .request(chain.request()) .protocol(Protocol.HTTP_1_1) .body("{}".toResponseBody("application/json; charset=utf-8".toMediaTypeOrNull())) .build() } @Singleton Loading app/src/main/java/foundation/e/apps/ui/MainActivityViewModel.kt +1 −5 Original line number Diff line number Diff line Loading @@ -299,11 +299,7 @@ class MainActivityViewModel @Inject constructor( } fun getLaunchIntentForPackageName(packageName: String): Intent? { return try { appLoungePackageManager.getLaunchIntent(packageName) } catch (e: Exception) { null } return appLoungePackageManager.getLaunchIntent(packageName) } fun launchPwa(application: Application) { Loading Loading
app/src/main/java/foundation/e/apps/data/cleanapk/RetrofitModule.kt +2 −21 Original line number Diff line number Diff line Loading @@ -169,28 +169,9 @@ object RetrofitModule { "User-Agent", "Dalvik/2.1.0 (Linux; U; Android ${Build.VERSION.RELEASE};)" ).header("Accept-Language", Locale.getDefault().language) try { return@Interceptor chain.proceed(builder.build()) } catch (e: ConnectException) { return@Interceptor buildErrorResponse(e, chain) } catch (e: Exception) { return@Interceptor buildErrorResponse(e, chain) } } } private fun buildErrorResponse( e: Exception, chain: Interceptor.Chain ): Response { Timber.e("buildErrorResponse: ${e.localizedMessage}") return Response.Builder() .code(403) .message(e.localizedMessage ?: "Unknown error") .request(chain.request()) .protocol(Protocol.HTTP_1_1) .body("{}".toResponseBody("application/json; charset=utf-8".toMediaTypeOrNull())) .build() } @Singleton Loading
app/src/main/java/foundation/e/apps/ui/MainActivityViewModel.kt +1 −5 Original line number Diff line number Diff line Loading @@ -299,11 +299,7 @@ class MainActivityViewModel @Inject constructor( } fun getLaunchIntentForPackageName(packageName: String): Intent? { return try { appLoungePackageManager.getLaunchIntent(packageName) } catch (e: Exception) { null } return appLoungePackageManager.getLaunchIntent(packageName) } fun launchPwa(application: Application) { Loading