android 9 support

This commit is contained in:
CherretGit
2025-12-25 20:12:28 +07:00
parent 35b0068b8c
commit 71a46f878b
3 changed files with 7 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ android {
defaultConfig {
applicationId = "com.cherret.zaprett"
minSdk = 29
minSdk = 28
targetSdk = 35
versionCode = 25
versionName = "2.13"

View File

@@ -8,6 +8,7 @@ import android.app.PendingIntent
import android.content.Intent
import android.content.SharedPreferences
import android.net.VpnService
import android.os.Build
import android.os.ParcelFileDescriptor
import android.util.Log
import androidx.core.app.NotificationCompat
@@ -130,7 +131,9 @@ class ByeDpiVpnService : VpnService() {
.addAddress("10.10.10.10", 32)
.addDnsServer(dns)
.addRoute("0.0.0.0", 0)
.setMetered(false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
builder.setMetered(false)
}
if (ipv6) {
builder.addAddress("fd00::1", 128)
.addRoute("::", 0)