mirror of
https://github.com/wgtunnel/android.git
synced 2026-07-03 14:07:49 +02:00
bfb8d59827
- Attempts to fix tunnel and auto-tunnel reliability by removing the tunnel foreground service and circumventing the limitation of starting the vpn service from by background by using a broadcast receiver. - Removes tunnel foreground notification. - Improves the reliability auto-tunnel start on reboot by adding an additional notification launch calls. - Fixes bug where pin feature could be turned on without the pin being set. - Improves quick tile reliability and sync. - Improves reliability of app shortcuts. - Improves kernel mode - Improves permissions flow - Adds support for dynamic app colors Android 12+ - Add support for light/dark system modes
57 lines
1.3 KiB
Kotlin
57 lines
1.3 KiB
Kotlin
package com.zaneschepke.wireguardautotunnel.data
|
|
|
|
import androidx.room.AutoMigration
|
|
import androidx.room.Database
|
|
import androidx.room.DeleteColumn
|
|
import androidx.room.RoomDatabase
|
|
import androidx.room.TypeConverters
|
|
import androidx.room.migration.AutoMigrationSpec
|
|
import com.zaneschepke.wireguardautotunnel.data.domain.Settings
|
|
import com.zaneschepke.wireguardautotunnel.data.domain.TunnelConfig
|
|
|
|
@Database(
|
|
entities = [Settings::class, TunnelConfig::class],
|
|
version = 9,
|
|
autoMigrations =
|
|
[
|
|
AutoMigration(from = 1, to = 2),
|
|
AutoMigration(from = 2, to = 3),
|
|
AutoMigration(
|
|
from = 3,
|
|
to = 4,
|
|
),
|
|
AutoMigration(
|
|
from = 4,
|
|
to = 5,
|
|
),
|
|
AutoMigration(
|
|
from = 5,
|
|
to = 6,
|
|
),
|
|
AutoMigration(
|
|
from = 6,
|
|
to = 7,
|
|
spec = RemoveLegacySettingColumnsMigration::class,
|
|
),
|
|
AutoMigration(7, 8),
|
|
AutoMigration(8, 9),
|
|
],
|
|
exportSchema = true,
|
|
)
|
|
@TypeConverters(DatabaseListConverters::class)
|
|
abstract class AppDatabase : RoomDatabase() {
|
|
abstract fun settingDao(): SettingsDao
|
|
|
|
abstract fun tunnelConfigDoa(): TunnelConfigDao
|
|
}
|
|
|
|
@DeleteColumn(
|
|
tableName = "Settings",
|
|
columnName = "default_tunnel",
|
|
)
|
|
@DeleteColumn(
|
|
tableName = "Settings",
|
|
columnName = "is_battery_saver_enabled",
|
|
)
|
|
class RemoveLegacySettingColumnsMigration : AutoMigrationSpec
|