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

@@ -4,10 +4,10 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2025-10-03T07:21:08.712998131Z">
<DropdownSelection timestamp="2025-12-25T12:35:51.525171977Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="LocalEmulator" identifier="path=/home/dimap/.android/avd/Medium_Phone.avd" />
<DeviceId pluginId="LocalEmulator" identifier="path=/home/dimap/.android/avd/Medium_Phone_3.avd" />
</handle>
</Target>
</DropdownSelection>

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)