diff --git a/app/src/main/java/com/topjohnwu/magisk/di/Networking.kt b/app/src/main/java/com/topjohnwu/magisk/di/Networking.kt index 110896d00..21fef91b5 100644 --- a/app/src/main/java/com/topjohnwu/magisk/di/Networking.kt +++ b/app/src/main/java/com/topjohnwu/magisk/di/Networking.kt @@ -63,6 +63,12 @@ fun createOkHttpClient(context: Context): OkHttpClient { }) } + builder.addInterceptor { chain -> + val request = chain.request().newBuilder() + request.header("User-Agent", "Magisk ${BuildConfig.VERSION_CODE}") + chain.proceed(request.build()) + } + if (!ProviderInstaller.install(context)) { Info.hasGMS = false }